- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Good day!
Is it possible to make a section of the catalog request form only available to certain group of users?
Example, a set of questions are only applicable and visible to users in Poland.
Thank you!
Regards,
Jocelyn
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Yes why not.
You can use onLoad catalog client script and check logged in user's location.
if not Poland then use g_form.setDisplay('variable1', false); to hide
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @JLeong ,
You can do it using the UI policy. Keep onLoad checked and reverseIfFalse.
Add your specific condition then write the below script in execute if true
function onCondition() {
g_form.setVisible('section_name', true); //setVisible true/false based on your condition
}
Thanks,
Bhimashankar H
-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful' & 'Correct'. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Yes why not.
You can use onLoad catalog client script and check logged in user's location.
if not Poland then use g_form.setDisplay('variable1', false); to hide
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
I believe I answered your question as well.
As per new community feature you can mark multiple responses as correct.
The answer marked as correct talks about using UI policy.
In UI policy you can't check logged in user's country in Condition field then how it's going to work?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @JLeong
yes mate you can try with Catalog UI policy and hide it or use the client script.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hello @JLeong,
Yes, you can make a section of catalog request form visible only to certain group by applying UI Policies or Catalog Client Scripts.
You can use onLoad Catalog client Script with below logic:
function onLoad() {
if (g_user.isMemberOf('Group name')) {
g_form.setDisplay('variable_name', true);
} else {
g_form.setDisplay('variable_name', false);
}
}
Please Mark Correct ✔️ if this solves your query and also mark Helpful 👍 if you find my response worthy based on the impact.
Regards,
Shruti