Trying to get the group names in Assignment group variable which requested for belongs to
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 08:32 AM
Hi ,
Get list of groups thats Requested for belongs to in a catalog form variable called Assignment group I have written script include and onChnage catalog client as below but some how it's not setting the values in the refernce variable and also am able to get the sys_ids's of all the groups from script include but its not setting it in the reference variable
Note: This is in scoped application not in Global scope
Script include:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 11:26 AM
Hi @Vrushali Kolte Sorry again still the same issue it's pulling all the group names
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 11:28 AM
Can you add a space as well while using reference qualifier as below:
javascript&colon: new scriptincludename().yourfunctionname(current.variables.requested_for+"");
And update the script as below
getGroups: function(user) { var groups = []; //var user = this.getParameter('sysparm_userID'); var gr = new GlideRecord('sys_user_grmember'); gr.addQuery('user', user); gr.query(); while (gr.next()) { groups.push(gr.group.sys_id); } return 'sys_idIN' + groups; },
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-23-2024 11:35 AM
Hi @Vrushali Kolte Sorry still the same