UI Policy and identical Execute if true and false

miro2
Mega Sage

Hi,

I just want to confirm one thing related to UI Policy.
If the scripts in 'Execute if true' and 'Execute if false' are identical, then the same script will be executed regardless of whether the condition is true or false. This means that the script will run every time the UI policy is applied.

Based on a community article written some time ago, I believe this is correct and can be done in this way.

Please correct me if I'm mistaken, if this can't be done this way, or if essentially only 'Execute if true' should be used.

The second question I have is whether "Reverse if false" in this scenario (both scripts in 'Execute if true' and 'Execute if false' are identical) should be checked.

miro2_0-1705002365976.png

 

miro2_1-1705002390605.png

 

1 ACCEPTED SOLUTION

Hi @miro2 ,

 

Yes it will be acceptable

 

Thanks,

Danish

 

View solution in original post

9 REPLIES 9

Hi @miro2 ,

 

What I would suggest you here is instead u can use an onLoad client script if in both scenarios u want to execute same piece of code.

So onLoad will cover only 1 line of code.

 

Thanks,

Danish

 

@Danish Bhairag2 
Thank you for the reply. Yes, this can also be done with an onload client script.

However, if someone decides to use a UI Policy, keeping only the script under 'Execute if true' and removing 'Execute if false' will achieve the same result as the client script, right? 

Is this approach with UI Policy acceptable?

Hi @miro2 ,

 

Yes it will be acceptable

 

Thanks,

Danish

 

Hi @miro2 ,

 

If my response helped you kindly Accept it as a Solution so that others can benefit from it.

 

Thanks,

Danish

 

@Danish Bhairag2 thanks