Formula Function
The Formula Function calculates values in the checklist lines based on input data stored in variables, which are calculated by a formula. The result of the calculation is transferred to the Value of Function or Value of Function (alphanum.) fields, which can be passed to the Input field and stored in a variable for use in a calculation.
As with other dynamic checklists, activating the Automatic Recalculation fields in header and lines automatically initiates the calculation in the lines.
Example
In the following video, a checklist template has two answers defined, both with an Input Type = Decimal. For the first answer, a length specification is expected and in the second, an indication of width. The input becomes stored as the variables "C_LENGTH" and "C_WIDTH", respectively.
The result is listed in the last line. When entries are made in the Input field on the answer lines, the calculation occurs directly in the Value of Function field as specified in the Formula Function field: The contents of the variable "C_LENGTH" is multiplied by the contents of the variable "C_WIDTH".
If the input is changed and the Always Overwrite checkbox is not selected, the calculated value will not change. Selecting the Value of Function is Default checkbox transfers the Value of Function to the Input field on the line. This is important if the value needs to be saved in a variable, as is done when the "C_QM" variable is added to the result line.
String Functions
With string functions, you can calculate alphanumeric text and decimals with the Formula Function, which can concatenate text or choose certain elements of a string based on placement and number of characters. The strings can contain spaces and special characters as long as the Free Text checkbox is selected on the checklist line. Additionally, if the Value of Function is Default checkbox is selected, the character count is calculated and displayed in the Value of Function field.
Example
This example uses this checklist line to provide string function calculation results:
Description | Input Type | Input | Variable for Dynamic BOM | Free Text | Formula Function | Value of Function is Default |
---|---|---|---|---|---|---|
Input Text 1 | Text | This is | TEXT1 | X | X | X |
Input Text 2 | Text | the text | TEXT2 | X | X | X |
Input Text 3 | Text | to combine | TEXT3 | X | X | X |
Input Digit | Decimal | 1000 | DIGIT1 | X | X | X |
Based on the above checklist line, new checklist lines are entered with the following string functions.
String | Description | Formula Function | Calculated "Input" Result | Calculated "Value of Function" Result |
---|---|---|---|---|
CONCAT | Concatenates strings of text into a single line. | CONCAT(TEXT1; TEXT2; TEXT3; ".") | This is the text to combine. | 28 |
MID | Uses a starting position to identify where in the string to begin and then includes the designated number of characters. | MID(TEXT1; 6; 2) | is | 2 |
LEFT | Starting at the left (beginning) of the designated string, identifies the position to start and then includes the designated number of characters. | LEFT(TEXT2; 3) | the | 3 |
RIGHT | Starting at the right (end) of the designated string, identifies the position to start and then includes the designated number of characters. | RIGHT(TEXT3; 7) | combine | 7 |
CONCAT | Concatenates strings of alphanumeric text into a single line. | CONCAT(TEXT1;TEXT2;TEXT3; " "; DIGIT1; ".") | This is the text to combine 1000. | 33 |
Feedback
Submit feedback for this page .