Programa Rules (HIde or disable a Data Element)

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.

can anyone tell me how to do this, please?

Hi @Denilson

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

#{VariableName} != ‘YesOptionCode’

3. Program rule action
Finally you need to select the action, which is hide field, and the DE that will be hidden

You can find more information in the documentation or in the YouTube channel.

4 Likes

HI @nancyesp thank you for your availability and help, i will try this now, and i will say anything.
Thank you so much :pray:

Hi @nancyesp I hope you are doing well, thank you so much your support yesterday about Program rules, is all working fine now. God bless you!

2 Likes