Example 1 - Simple boolean check
Introduction
This example demonstrates a simple scenario:
I want to enable/disable a control property based on a Checkbox control.
Let's imagine an example of this:
My item form has controls for a Yes/No attribute named Dangerous and a Text attribute named Description.
If Dangerous is enabled, Description should be required. I can create an expression that exposes the Value property of the Dangerous control to other controls. I can then set the Required property of the Description control to target the expression.
1 Create the expression
When editing an item form, select Expressions in the app bar. On the left, select Add to create an expression.
In the Item Form Expression Builder, select Edit at the top. Enter a descriptive name and select Save.
2 Add a global Boolean
Select Globals in the app bar and choose Boolean to add a node to the canvas.
Select the node's Edit button. Select Global value, choose Dangerous Value and then select Save.
3 Add a final Boolean
Select Finals in the app bar and choose Boolean to add a node to the canvas.
4 Link the nodes together
Select the right circle of the global Boolean node and the left circle of the final Boolean node. This links them together.
Select Save to finish.
5 Target the expression
Back in the Item Form Builder, select the Description control. For its Required property, select Target and choose your saved expression.
Select Save to finish.
