Field with lock icon displays briefly when hidden by UI policy

mark69
Giga Contributor

Hi,

If I add a field with a lock icon, for example a List type field, to a form and then create a UI policy that sets visible to false for this field then every time the form is refreshed the field is visible shortly. Then the field is hidden and the fields below it move up.

Is there any way that I can prevent this behavior?

 

9 REPLIES 9

AbhishekGardade
Giga Sage

Hello Mark,

Try with onLoad Client script. add below line of code:

g_form.setReadOnly('FieldName',true);

Client Scripts execute First, then UI Policy . If there is conflicting logic between a Client Script and a UI Policy, the UI Policy logic applies.

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

Thank you,
Abhishek Gardade

I already tried with g_form.setDisplay (I don't want to make the field read-only but hide it), but this behaves exactly the same as using a UI policy.

 

Hi

Try with g_form.setVisible() once.

 

Regards,

Omkar Mone

This behaves the same except that the other fields do not move up as the space of the field is retained.