- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2023 04:06 PM
In ServiceNow UI builder configurable workspace, what is the best way to hide a component based on the current logged-in user's group? I know how to hide a component based on the current user's role utilizing the api user.roles but I want to use the current user's group as the criteria instead. I really appreciate the help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2023 05:48 AM
Hi,
You have more than one option to choose from.
1. You can use look up records data source to get the groups of current logged in user. Then you can use the output to determine if you need to hide/show the component.
Below are the conditions you can use in your data source.
2. You can create your own transform data source to execute your logic and then the output can used to determine if you want to show the component or hide it. See here my article series to know how you can create your own transform data source.
ServiceNow Community Rising Star 2022/2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-08-2023 05:48 AM
Hi,
You have more than one option to choose from.
1. You can use look up records data source to get the groups of current logged in user. Then you can use the output to determine if you need to hide/show the component.
Below are the conditions you can use in your data source.
2. You can create your own transform data source to execute your logic and then the output can used to determine if you want to show the component or hide it. See here my article series to know how you can create your own transform data source.
ServiceNow Community Rising Star 2022/2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2024 08:34 PM
@JagjeetSingh how can we use it in the container visibility script. The first option from above. can you please help on that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2023 08:44 AM
Thank you so much!!