Use Rule Variables in Scripting Rules
This page contains an simple tutorial how to implement Rule Variables into your Scripting rule script.
Last updated
This page contains an simple tutorial how to implement Rule Variables into your Scripting rule script.
Last updated
Rule Variables can be defined in Rule Settings section in scripting rule editor. All you need to do is to just simply define name and value of scripting variable.
More detailed overview what you can do with Rule Variables is described here.
Usage of Rule Variables in Scripting Rules is super easy. All RVs values are stored in theruleVariables
object that is exposed in the script. You can use these stored values everywhere in the script (as inputs for your function or as inputs for DR.solve()
function...)
Rule Variables supports JavaScript primitive data types only. (number, string, boolean, symbol)
You cannot set ruleVariables
from script itself or overwrite existing Rule Variable.