- 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
06-08-2020 02:50 AM
Hi
can you please help me on below thread?
- Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2020 03:02 AM
Hi Sai,
Can you mark the reply from my side which helped you so that it would benefit others.
Such as the one which I said that I was able to replicate the issue.
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
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 09:06 AM
Please make sure that Apply on Requested Item or Catalog Task is selected.
You can also do it using one of UI Policy action rather than using g_form.setDisplay('variable_set', false);
but I do not see anything wrong in using g_form.setDisplay('variable_set', false);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2020 04:58 AM
Hi Rajneesh,
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.