|
Expression editor
Introduction
An Expression in SoftRules® is a collection of Conditions separated with a Logical Operator. It is used in several Tools, such as Decision, Stop and Loop but also in Column Headers, Adapters, Products, SubProducts, Suppliers, Groups and Questions (and more). Conditions exist of a Left and a Right operand. You can build Expressions with this Expression Editor.
Description
Give here a description of your Expression. If left empty the Expression itself will be shown in the tree.
Start value
The start value of the Expression (True or False).
Logical operator
The Logical Operator that separates two Conditions. A Condition can have only two possible values: True or False. If the Condition is empty, it will be True. There are only two Logical Operators AND and OR. Lets see how this works:
AND
The following is applicable to the AND operator:
Current value
|
Value Condition
|
New value
|
True
|
True
|
True
|
True
|
False
|
False
|
False
|
True
|
False
|
False
|
False
|
False
|
OR
The following is applicable to the OR operator:
Current value
|
Value Condition
|
New value
|
True
|
True
|
True
|
True
|
False
|
True
|
False
|
True
|
True
|
False
|
False
|
False
|
Operand type
There are three types of Operands:
●
|
Element
|
|
The value from the Element is used to parse the Condition. Also you can chose attributes and an Alt. path. See Assignment for more information about these items.
|
●
|
Constant
|
|
The literal value of the Operand is used to parse the Condition.
|
●
|
Formula
|
|
Operator
Possible values:
●
|
=
|
|
If the Left and the Right operand are the same, the Condition is True, otherwise False.
|
●
|
<>
|
|
If the Left and the Right operand are NOT the same, the Condition is True, otherwise False.
|
●
|
<
|
|
If the Value of the Left operand is smaller than the value of the Right operand, the Condition is True, otherwise False.
|
●
|
>
|
|
If the Value of the Left operand is larger than the value of the Right operand, the Condition is True, otherwise False.
|
●
|
<=
|
|
If the Value of the Left operand is equal or smaller than the value of the Right operand, the Condition is True, otherwise False.
|
●
|
>=
|
|
If the Value of the Left operand is equal or larger than the value of the Right operand, the Condition is True, otherwise False.
|
Condition list
By pressing this button, you add a Condition to the list with Conditions (the Expression). Using you remove the selected Condition. By pressing you can edit a Condition. If you where editing a Condition and cancels the Expression Editor without Adding the Condition, a reminder is shown.
Tip!
|
Sometimes the possibility to place brackets would be a nice feature to influence the flow that SoftRules® uses to parse the Conditions. Since SoftRules® doesn't facilitate you to place brackets, another technique can be used.
Example:
([IP_VEERB]=0&&[IP_AFKSER]=N&&([BA_BEVEIL]=B||[BA_BEVEIL]=T||[BA_BEVEIL]=V))
|
Buttons Copy and Paste expression
You can use the button Copy Expression to Copy the Expression to the clipboard in order to Paste it in another Expression (using the button Paste Expression).