- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2025 01:39 AM
Hello,
I am setting up new Catalog Item that allows users to request software to be checked by Infosec staff so that they can check on privacy settings and so on. I have some varibales/questions that are visible to the user and some that need to be on visible to the Infosec member of staff. How do I acheive this via a Catalog UI Policy?
David
Solved! Go to Solution.
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-12-2025 03:31 AM
Hi @davidsmith, have you had chance to review my answer above?
Please let me know how does it sound to you, please don't ghost my free time efforts :))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2025 02:25 AM - edited ā09-04-2025 04:25 AM
Hi @davidsmith ,
Since you need to pick the users and based on users/Roels you want to show/hide varaibles so this can be achieved throguh Catalog Client script. Utilize methods from Glide user class and write your client script.
If my answer helped you, please makr it- solution accepted.
Regards,
Nikhil Bajaj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2025 02:33 AM
since you want some variables to be shown/hidden based on group membership.
Please use onLoad catalog client script + GlideAjax
what did you start with and where are you stuck?
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-03-2025 03:35 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2025 02:59 AM - edited ā09-01-2025 02:59 AM
Hi @davidsmith ,
>> Create a Catalog UI Policy....
Set the Condition to check for the user's role:
g_user.hasRole('infosec_role')Define the actions you want to apply, such as setting the variable to mandatory or read-only...
** You can also use a Catalog Client Script for Dynamic Visibility **
Use the following script to check the user's roles and adjust variable visibility accordingly:
function onLoad() {
// Check if the user has the 'infosec_role'
if (g_user.hasRole('infosec_role')) {
// Show the variable for Infosec staff
g_form.setDisplay('variable_name', true);
} else {
// Hide the variable for end users
g_form.setDisplay('variable_name', false);
}
}
If you found my response helpful, please mark it as āAccept as Solutionā and āHelpfulā. This helps other community members find the right answer more easily and supports the community...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā09-01-2025 03:14 AM
Could you please help sharing the screenshots on how the role check condition can be applied in UI policy conditions field? It would be helpful for other members as well.