- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2020 03:55 AM
Hi All,
I am trying to hide the variable sets(~25) based on condition through UI policies on Catalog form & Variable Editor in scoped application.
g_form.setDisplay('variable_set', false); - is not working in scoped application.
What are the ways to achieve this requirement?
- Thank you.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-05-2020 12:54 AM
Is this question resolved or you need some more assistance?
Are you giving variable set name in the script?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2020 05:48 AM
Hi
Could you please provide a screenshot of what you want to hide?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-30-2020 08:06 AM
Hi,
So you want to hide variable set which contains ~25 variables
But it is not working in scoped app?
What are the type of variables inside it?
UI Policy applies on catalog or RITM view?
try setVisible()
g_form.setVisible('variable_set', false);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2020 04:57 AM
Hi Ankur,
We had created a variable(abc) with type as select box (25 choice values in it) on a record producer in scoped app. Based on the selection of choice in that variable (abc), we want to hide the variable sets on Variable Editor of scoped app.
Example: If I select the choice as 'Submit a Case', then I want to show the variable set related to Case and rest of the Variable Sets should be hidden.
I am able to achieve the requirement on Catalog form but not on the Variable Editor. Enabled 'Applies on the Target Record' condition on Catalog UI Policy but still no luck.
When I try to replicate the same in demo instance under global application, it is working good.
g_form.setVisible is messing up the form as it leaves the empty place between the variables.
Note: Some variables like Short Description, Description, Configuration Item, Business Service, Additional Notes were created as Variables under record producer (not in variable sets) and they were used based on the selection of choice on 'abc' variable.
- Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-03-2020 05:39 AM
Hi
Do you have any update on above mentioned query?
- Thank you.