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.
DriveWorks Quick Tips
We’ve all done it, we made a few rules with a constant number, thinking that it’s only one or two rules. Then it becomes 10… and then its 50, and then suddenly that value needs to be changed. Now you need to find all the rules that have that value and replace them with the right value, but the rules are long and complex and searching each one will take hours! This is where DriveWorks has your back.
DriveWorks Quick Tips are a series of 1 minute videos, available on YouTube, that explain specific functionality. View all Quick Tips