Variables can now be created directly from the rules builder.
This is an essential new feature for making those long rules more straightforward on the fly!
Additionally variables used in existing rules can now be edited by launching additional child Rule Builders from anywhere in your project. This saves having to close the current task, open the define variables task to correct variables.
Strings, calculations, formulas, functions, references and everything else used within a rule can be extracted to create a new variable directly in the Rule Builder.
An option also exists to find all occurrences of the selection, in every rule within the project, and replace each with the new variable.
To extract a portion of the rule you are currently building to a variable, in the rule builder:
The field where the name is entered gives feedback on validity by remaining red when there is an error, and turning green when the name is acceptable.
The OK button on the Extract variable dialog will be disabled until a valid name is entered.
Causes of unacceptable variable names include:
The Extract variable dialog has an option to Replace in all rules.
Selecting this option will replace all occurrences of the rule throughout the project.
Once OK is selected, and with the Replace in all rules option selected, a new dialog will open.
The Replace in all rules dialog will show all rules that will be changed.
There is an option for not changing a particular rule by deselecting the check box next to the required rule.
The Replace in all rules dialog displays the old rule - along with the portion that will be replaced highlighted. It also displays how the new rule will look with the created variable highlighted.
Once all replacements have been reviewed click OK to accept the changes and apply them into the project.
Click OK to close the rule builder.
To edit an existing variable contained within a rule, in the rule builder:
A further Rule Builder will open with the rule applied to the selected variable ready for editing.