The Extract Variable function allows variables to be created directly from the Rule Builder.
Anything entered in the rule editor can be extracted to create a new variable.
Any occurrences of the selection can be searched for in every rule within the project, and be replaced 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.