Hi everyone I hope you are doing well, well I have a program in which I have to validate fields.
Example:Do you have a computer? if the user selects the dropdown NO, the Data element under which is (Inform the especifications) should be hidden or blocked or even disabled.
To create a program rule, there are 3 components that you need to take into consideration:
1. Program rule variables
These ones let you use the data values in the program rule expression. In your case, you need to create a variable for the “Do you have a computer?” data element (DE) since you are using it to trigger the action, which is to hide the next DE.
You’ll see you have different options of variables. You can choose the one that best suits your case (I would recommend using “Data element in current event”).
2. Program rule condition/expression
The expression is the one that triggers the action. You have several options to activate what you need. For example:
2.1 Rule is trigger when the “No” option is selected
#{VariableName} == ‘NoOptionCode’
2.2 Rule is trigger when the field is empty or the “No” option is selected