There are many cases where you might want to dynamically display a result of a numerical calculation, such as the total amount and consumption tax, in the data input screen. For Numeric type Data Items it is possible to set a formula (arithmetic expressions), and the calculation result will be input dynamically.
1. Overview about Notation elements of Expressions that can be set to Numeric type data
- a. Numeric Value
- You can write real numbers such as "1.08" or "30"
- b. Arithmetic Operators
- You can use addition "+", subtraction "-", multiplication "*", division "/", and parenthesis "(" and ")"
- c. Numeric type data (Reference)
- You can set a reference to other Numeric type data (e.g. #q_numeric1)
- d. Table type data (Reference)
- You can set a reference to a column's sum in Table type data (e.g. #q_table1.summary['3'])
- To refer to another Data Item, specify the Field name set for that item
- It is also possible to set a reference to a value of "Numeric-type data which has an arithmetic expression" (Cascade reference)
- Circular references will cause an error, so nothing will be updated
2. Set an Expression in a Numeric type data item
- 1. Organize the Reference Relationship
- Organize in advance which numeric data depends on which numeric data
- 2. Set an Arithmetic Expression
- Set an expression which is expressed only by addition, subtraction, multiplication, and division
- The calculation result will be reflected in real-time (browser processing)
- You will not be able to input manually to a Numeric type Data Item which has an expression set
- Numeric-type data referenced in the formula must be set displayed (non-input will be handled as "0")
- It is recalculated on the server-side even when downstream processing is complete (server processing)
- Advanced formulas such as exponentiation and trigonometric functions require script knowledge (M213, M230)
#q_unitPrice * #q_quantity
(#q_orderTable1.summary['3'] - #q_discount) * (1 + #q_taxRate)
3. The Principles of Truncation
- 1. Set the Significant digits
- If you set "decimal digits 0" the decimal point will be truncated
- By setting plus "0.5" to the calculation expression, you can achieve "rounding" of a significant figure
Comments
0 comments
Please sign in to leave a comment.