Mobile UI Rule is not working for boolean input

Mostafa Kansouh
Tera Expert

Hello All, 

This one has been driving me crazy, it should work in theory but does not, so im curious if ive stumbled upon a bug in the platform. So I have a footer action/action item on an incident record linked to a input form screen. I have two inputs configured like this: 

find_real_file.png

find_real_file.png

Ive also got two variables set up as database fields to populate their values: 

find_real_file.png

find_real_file.png

I also have a Mobile Ui Rule in place like so: 

find_real_file.png

In theory this is supposed to onload get the value of the bool and if its true set the other field to be visible, mandatory otherwise it will be hidden. The problem im facing is that the onload here does not work but the onchange does. How can i get around this? Am i missing something here?

 

1 ACCEPTED SOLUTION

Mostafa Kansouh
Tera Expert

In case anyone else runs into this issue, the only way i got it to work was by changing the variable type to scripted and setting its value: 

find_real_file.png

View solution in original post

3 REPLIES 3

asifnoor
Kilo Patron

In the onload, may be the condition is not matching. Is the value being set after the form is loaded?

Also, not sure, but can you give order to those UI rule actions with first being mandatory set and then visibility and test it once. Becuase in reverse, mandatory has to become false first before visible going to false.

Mark the comment as a correct answer and also helpful if this has helped to solve the problem.

The value of the boolean is being set correctly onload, however, the Ui Rule does not think so. 
I have also tried to change the order of the ui rule actions but it makes no difference since anyway as i mentioned the onchange works.

Mostafa Kansouh
Tera Expert

In case anyone else runs into this issue, the only way i got it to work was by changing the variable type to scripted and setting its value: 

find_real_file.png