- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2021 10:23 AM
Hi,
I need help on how to populate assignment group based on user select dropdown variable value that contains pacific word using Flow Designer f(x) script.
This is what I have, but it did not work. Can someone please provide suggestion. Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2021 12:06 PM
If using Flow anyway, why not use Decision Tables? You can then create a completely code free solution.
Define the decision table that accepts a text input to use in the condition:
AAnd the condition:
Then use it in the flow:
Using a Catalog Item variable as below:
And finally update the assignment group:

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2021 11:15 AM
Hi.
Assignment group is a reference, so if you want to populate it with a valid value, you'll need to return a sys_ID, not the name of the group from your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2021 11:25 AM
Hi,
How do I modify the following code to make it works. Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2021 12:38 PM
You could try something like the following:
var av ='';
var groupSysID = '';
var TeamName = 'Outlook App';
if(TeamName.indexOf('Outlook') == -1){
av = 'IT Service Desk Team';
var assignGR = new GlideRecord('sys_user_group');
assignGR.addQuery('name', av);
assigneGR.query();
if (assignGR.next()){
groupSysID = assignGR.getUniqueValue();
}
}
return groupSysID;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2021 01:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2021 12:06 PM
If using Flow anyway, why not use Decision Tables? You can then create a completely code free solution.
Define the decision table that accepts a text input to use in the condition:
AAnd the condition:
Then use it in the flow:
Using a Catalog Item variable as below:
And finally update the assignment group: