UI Policy Not Hiding Fields Properly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello,
I am currently setting up a catalog item, and I need certain fields to be displayed depending on the user’s selection.
My goal is for only the Choice field to be visible when the form loads, and for the conditional variables to appear afterward based on what the user selects.
I tried using a Catalog UI Policy to hide the fields that should not be visible by default, but the policy only applies to one field at a time (only one field hides properly).
I need your assistance to solve this issue and allow multiple fields to show or hide depending on the selected value.
Thank you in advance for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @ADJARATOUT,
please share the catalog UI policy (actions) that you made to understand your struggle better
No AI was used in the writing of this post. Pure #GlideFather only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hello @ADJARATOUT ,
Solution 1 :
Plz have a look on orders of actions, this can create a ambiguity :
Solution 2 :
You can Use a UI Policy to handle the default “hide all” state (simpler to maintain) ->
Then client script for the conditional logic if you have many combinations.
For client script you can code :
g_form.setDisplay('field1', false);
g_form.setDisplay('field2', false);
g_form.setDisplay('field3', false);
if (newValue == 'optionA') {
g_form.setDisplay('field1', true);
} else if (newValue == 'optionB') {
g_form.setDisplay('field2', true);
g_form.setDisplay('field3', true);
}
If my response helped mark as helpful and accept the solution.
