Hide field program rule working in web but not in android

Hi all,

I have some hide field program rules that work well in web but they do not work in android.

Web
when ticking No, it hides the fields
image

Android
when ticking No, it does not hide the fields

image

Looking forward to your help

Thanks

Hi @fernando

I had the same problem. So you need to check your Program Rule Variable name. Try to change all variables which consist space into underscore _. I know it maybe a lot of work to do, but you have to. This rule applicable mostly for the variables which has YES_ONLY & YES_NO type of DEs/TEAs.

If you will have any further questions, please share your programRuleVariables and your programRules in json format. Then community will try to help you.

Regards, Ulanbek

3 Likes

Hi @fernando

In android rules won’t hide fields if they are required, you can solve this making the data element not compulsory and using rules to require it when criteria is met.

Hope this helps

William

2 Likes

Hi @waviles,

Can you explain further this part?

Thanks

Hi @fernando

You need to change the data element to not required in the program design.

Then you will need 2 rules:

When yes is selected then make field mandatory
When no is selected then hide field

This way you make sure that information is entered in the field when needed.

Best

William

3 Likes

Hi @waviles,

This has worked

Thank you.

3 Likes