- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2024 03:50 AM
Hi Experts,
I have a requirement like I have created a record producer. The first variable is a select box in which I have added 4 choices. I want to hide some choices if a logged-in user belongs to a group.
How can I achieve this?
Let me know if anyone has done similar to this requirement.
Regards,
Amol
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2024 11:31 PM - edited 01-21-2024 11:33 PM
Hi All,
Thank you for your replies. I got the answer from the thread:
Script Include:
Thank you,
Amol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2024 02:57 AM
Hi @Ankur Bawiskar,
Thank you for your reply.
I have a requirement like I have created a record producer. The first variable is a select box in which I have added 4 choices. I want to hide some choices if a logged-in user belongs to a group.
How can I achieve this?
I can't use role in catalog client script due to licensing issues. How can I achieve this?
I was reading some of your answers on similar kind of thread like using a Display BR and Client Script but that was not working on my case. Should I create the BR and client script in Global scope only?
Thanks in advance,
Amol
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2024 03:07 AM
you can use onLoad client script + GlideAjax
Inside the script include function check if user belongs to that group and return true/false
then inside onLoad check the value is true/false and then based on that remove the options
BR won't work for catalog form
script is present here. I hope you can modify it as per your requirement
Hide Question Choice based on logged in user belonging to group
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
01-21-2024 11:31 PM - edited 01-21-2024 11:33 PM
Hi All,
Thank you for your replies. I got the answer from the thread:
Script Include:
Thank you,
Amol