Create scripted values
You can use the code editor to create scripted values. The code editor provides you with the ARIS process language and has an integrated syntax checker and an auto-complete capability. When you start typing, the editor displays suggestions of possible operators and operands. You find descriptions of available operators and operands in the Scripting operators and operands chapter.
In scripted values, you can use variables at any place in the code. Variables work as placeholders and will be replaced before evaluating the code. This means that variables are literal values, but that they can also contain parts of the code.
Tip
You can insert a comment line in the code by using the # character. Everything between # and the end of line is a comment, for example,
...
# this is a comment.
On the Rule configuration panel, click the
Numerical value icon >
Script value.
Click
Edit in the Value input field. The code editor to create scripted values opens.
Enter a name for the scripted value.
Select the data type of the scripted value from the drop-down menu.
Select the default granularity for the formatting from the drop-down menu. Time span formatting must always be done in milliseconds for correct results.
Click in the first line of the editor and press Ctrl + Space to display all supported operators and operands. A box with the available elements opens.
When you start typing, the list in the box is searched for the corresponding column fields, variables, or aggregations.
Select the required elements, such as fields and operators, in the box. You can also enter the code directly in the editor field.
Define the script using the relevant operators and operands.
Click Apply.
You created a scripted value. The scripted value is added as a threshold value to the threshold configuration.
If you want to use the legacy version of the script editor, enable Legacy mode. Legacy mode is disabled by default. This mode is automatically enabled only for existing scripts that were created with the previous script editor. Note that legacy mode is deprecated and it is strongly recommended to use the new enhanced mode.