The Advanced Statement Builder facilitates the construction of logical conditions, defining business rules that are used to control a desired outcome. Any number of discrete statements can be created within the condition workspace and then combined into an overall algorithm using standard Boolean operators: AND / OR. Through the Join Builder function, the preferred operator can be adjusted between adjacent condition statements and also parentheses can be inserted to denote required modifications to the order of these operations - referred to as precedence rules. A statement can comprise any combination of functions - selected from 'Find part of a field', 'Difference between two dates' or 'Add a value to a date' - and field variables, separated by the required operators. For each selected function, the input arguments used to calculate the outputs are closely controlled. Similarly, for each inserted field, the range of validation tags available for selection is filtered, based on the specific entity. Once a function or field has been inserted, system validation rules govern the matching expression operators that can be selected, based on the inherent data type, such as conditional expression operators (= <> < <= > >= IN LIKE) or arithmetic expression operators (+ - * /). A number of actions are available to control the creation and management of statements within the conditions workspace, summarised in the table below.
Action |
Description |
Add Function |
This inserts one of three pre-set formulas into the condition workspace: Find part of a field, Difference between two dates or Add a value to a date. The function name informs the statement builder what calculation to perform, based on the arguments (inputs) specified by the end user. |
Add Field |
This inserts a validation tag - an entity component - into the condition workspace. The available entities will be governed by the module area from which the advanced statement builder is launched. |
Add Operator |
This inserts a context-dependent operator symbol immediately after a function or field to control the desired result; these can be a combination of conditional or arithmetic operators to match the expected data type output. This action can only be applied to an unresolved function of field. |
Add Value |
Enables the matching expression value to be inserted into the condition workspace. This action can only be applied in conjunction with an unresolved operator. |
Clear |
This action will empty the condition workspace, ready for the construction of a new statement. Where an incomplete statement is displayed, the end user is asked to affirm that the current entry can be deleted. |
Add |
This will transfer a resolved statement to the Conditions summary table. |
Remove |
This will remove a resolved statement from the Conditions summary table. |
Inserts parentheses to control the order in which individual conditions will be applied. This operates in conjunction with the Join Builder, which is used to adjust the preferred operator between adjacent conditions - AND / OR - and also the relative position of each condition within the overall equation. |
The procedure to add a statement function to the condition workspace is as follows:
The procedure to add a statement field to the condition workspace is as follows:
Note
1 The input values available for selection - entity fields - will be governed by the module area from which the statement builder is launched.
2 For a date argument the choice of values are typically + - * / = <> < <= > >=; for a string argument the choice of values are typically <> = LIKE; for a lookup argument the choice of values are typically <> = IN.
3 Text and numeric values should be entered without quotation marks; for date entries, use the calendar icon (), or type in the value directly (format DD/MM/YY or DD/MM/YYYY).
4 To remove an existing condition statement, select the corresponding row in the condition summary table and click on Remove.
5 To amend the function constraints, select the corresponding row in the condition summary table and double-click on the function in the condition workspace.
See related topics....