Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
borderColorgreen
borderWidth1
titleBGColor#ddffcc
borderStylesolid
titleDefinition

Calculation Field allows you to perform a series of arithmetic computations to a set or a series of fields. คือข้อมูลการคำนวณที่ช่วยให้คุณสามารถทำการคำนวณทางคณิตศาสตร์ให้กับข้อมูล

Figure ภาพที่ 1: Screenshot highlighting Calculation Field taken from sample  ภาพตัวอย่างแสดงฟิลด์คำนวณใน App HR Expenses Claim appclaim 

ภาพรวมในหัวข้อนี้ได้จาก Screenshots taken from http://localhost:8080/jw/web/console/app/hr_expense/1/form/builder/hr_expense_claim

Figure ภาพที่ 2: Calculation Field Propertiesคุณสมบัติฟิลด์คำนวณ

NameDescription
IDElement ID (By declaring as รหัส (เมื่อประกาศชื่อ "total" , a corresponding database table column แล้ว จะมีการสร้างคอลัมน์ตารางในฐานข้อมูลว่า "c_total" will be created)
LabelElement Label to be displayed to end userชื่อที่จะแสดงให้ผู้ใช้เห็น.
Variables
NameDescription
Variable NameDeclare a name to store current row equation result.
ประกาศชื่อตัวแปรเพื่อเก็บผลลัพธ์ของสมการ
Field ID

Form Field ID to retrieve.

In the example above, we are summing at a specific column from a Form Grid.

Form Grid ID: entries

Column in Form Grid: formattedAmount

Field ID to be filled in: entries

เพื่อดึงเขตข้อมูล

ในตัวอย่างข้างต้นเรากำลังสรุปที่คอลัมน์ที่เฉพาะเจาะจงจากตารางแบบฟอร์ม 
Form Grid ID: รายการ 
คอลัมน์ในตารางแบบฟอร์ม: formattedAmount ID 
ฟิลด์ที่ต้องกรอก: entry.formattedAmount
Multivalue Operation
  • Sum
  • Avg
  • Min
  • Max
EquationArithmetic operation using the variables declared above.
การดำเนินการทางคณิตศาสตร์โดยใช้ตัวแปรที่ประกาศไว้ข้างต้น

 

Figure ภาพที่ 3: Calculation Field Properties - Advanced Options คุณสมบัติฟิลด์คำนวณตัวเลือกขั้นสูง 

NameDescription
Validator

Attach a Validator plugin to validate the input value.แนบปลั๊กอิน Validator เพื่อตรวจสอบความถูกต้องของค่าที่ป้อนเข้ามา

Info
titleWhen will validation takes place?

Validation will takes place whenever form is submitted except when it is submitted as การตรวจสอบจะเกิดขึ้นทุกครั้งที่มีการบันทึกแบบฟอร์มยกเว้นเมื่อบันทึกเป็น "Save as Draft".

Formatting Style
  • US Style Formatting (1,000.00)
  • European Formatting (1.000,00)
Number of DecimalNumber of Decimal
จำนวนทศนิยม
PrefixPrefix of the calculated value
คำนำหน้าของค่าที่คำนวณได้
PostfixPostix of the calculated valueคำด้านหลังของค่าที่คำนวณได้
Use Thousand Separator?Thousand Separator toggle.
ตัวคั่นหลักพัน
Hidden?Shows this element to the end user.
แสดงองค์ประกอบนี้ให้ผู้ใช้งานเห็นหรือไม่
Display as Label?Displays the value of the element as plain text.
แสดงค่าข้อมูลเป็นข้อความธรรมดาหรือไม่
Workflow Variable

If the form is part of a workflow process, upon saving of the form (by clicking on ถ้าแบบฟอร์มเป็นส่วนหนึ่งของเวิร์กโฟลว์โพรเซส เมื่อบันทึกแบบฟอร์ม (โดยคลิกที่ปุ่ม "Save as Draft" or หรือ "Complete" button). The value in this input field will be saved into the corresponding workflow variable named here.) ค่าในฟิลด์อินพุตนี้จะถูกบันทึกลงในตัวแปรเวิร์กโฟลว์ที่ระบุไว้ที่นี่

Info
titleUsing a non-existent Workflow Variable name

You will get the following warning with the name printed out (e.g. status) in the server log if you attempt to map to a non-existent Workflow Variable.คุณจะได้รับคำเตือนต่อไปนี้โดยแสดงชื่อตัวแปรออกมา (เช่น status) ถ้าหากการบันทึกของเซิร์ฟเวอร์ไม่มีค่าที่พยายามแมปกับตัวแปรเวิร์กโฟลว์ได้

Code Block
context attribute status does not exist in process context - adding new attributes to the process context is not allowed


...