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

Elijah Aromola
Mega Sage

It should work that way but I wouldn't recommend setting it up that way. Are you not able to achieve this with the correct conditions on the "When to apply" section of the UI policy configuration? 

Hi @Elijah Aromola 
I don't see any options to change section visibility on the workspace view using UI Policy Actions. I tried that before with no luck.

Danish Bhairag2
Tera Sage
Tera Sage

Hi @miro2 ,

 

Yes the script will execute tru logic when condition is true,when condition is false it will execute false section script.

 

Answer to your 2nd question is reverse if false will come into picture when u have UI policy actions. In your case u have scripts so if it's checked or unchecked will not have any impact.

 

Thanks,

Danish

 

Hi @Danish Bhairag2 
regarding my first question, that's correct, but the above UI Policy doesn't have any conditions. So, is it best practice, if there is no scenario when the condition is false or not set up, to keep 'Execute if false' with an identical script as 'Execute if true'?

as for the second question, thanks for explanations