Conditonnal show and multiselect in tracker program

Hi, please i need your help. I would like to display some options based on what i select. Example here if i select “yes” i need to display the textdate and if select “No” nothing is displayed. Also i would like to have multiselect choice if i need to answer a question in form. @Gassim

Thank You

1 Like

Hi @Ornella

I think your request is very similar to , and it has been solved:

Please share more info if that’s not the case. Thanks!

1 Like

Thank you @Gassim it is exactly what i want to do, please how do we add this condition “!d2:hasValue( #{variable} ) || #{variable}”

1 Like

Hi @Ornella

You are welcome! You can add the program rule expression when creating a program rule. You can see examples here: Learner's Guide to Program Rules - DHIS2 Documentation

The link should redirect you exactly to the example. I hope this helps.

:slight_smile:

1 Like

@Gassim I made the First one it works but when i do another it does not work, i do not know if i have made a mistake. In the option set Yes/NO,

1 Like

Hi @Ornella

Could you explain further like mention the step by step process? Are both program rules identical?

@Gassim thank you for you help, sorry i found the problem when i create a new program rule variable i forgot to check “use the code for option set”.

1 Like