- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2023 11:15 PM
I Have to prepare something like this:
If User is not member of 'group' - then he can Choose only 1 group, of course if he decide about to change assignment group. I'm working on Problem Table.
Here is example what is not working right now 😕
if (!gs.getUser().isMemberOf('6ae3f5b21b479850bf327bb5464bcb45') && gs.getSession().isInteractive()) {
current.addQuery('assignment_group', '6ae3f5b21b479850bf327bb5464bcb45');
I thought that 'isInteractive()' will help but I was wrong..
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 12:55 AM - edited 09-28-2023 01:00 AM
Hello @DIVI1 ,
Please find the below code, Goto Dictionary entry of Assignment group in problem form, and enter below code in Dictionary override -> Override Reference qualifier (check box)
javascript: if(!gs.getUser().isMemberOf('0c4e7b573b331300ad3cc9bb34efc461')) { "name=Problem Analyzers^EQ" } else { "name!=Problem Analyzers^EQ" } // Here I used Problem Analyzer Group for my convenient, you can replace your Problem Coordinator sys_id and name at respected places.
Please mark my answer correct & helpful, if it helps you
Thank you
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 12:55 AM - edited 09-28-2023 01:00 AM
Hello @DIVI1 ,
Please find the below code, Goto Dictionary entry of Assignment group in problem form, and enter below code in Dictionary override -> Override Reference qualifier (check box)
javascript: if(!gs.getUser().isMemberOf('0c4e7b573b331300ad3cc9bb34efc461')) { "name=Problem Analyzers^EQ" } else { "name!=Problem Analyzers^EQ" } // Here I used Problem Analyzer Group for my convenient, you can replace your Problem Coordinator sys_id and name at respected places.
Please mark my answer correct & helpful, if it helps you
Thank you
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 01:09 AM
Unfortunately do not work, I can see All of the groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 01:11 AM
can you share screenshots of your work... then It will be easy to answer
Thank you
G Ramana Murthy
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2023 01:31 AM
Now it's working!
I used:
javascript: if(!gs.getUser().isMemberOf('6ae3f5b21b479850bf327bb5464bcb45')) { "name=Problem Coordinators^EQ" } else { "name!=Problem Coordinators^EQ" }
in Dictionary override -> Override Reference qualifier
Do you know why javascript: didn't work ?