- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 07:11 AM
I am new to Flow Designer and I have been having issues how to dynamically change the catalog task assignment group based on a variable choice.
In my catalog item, I have 2 variables, Type (Select box) and Software. Now, depending on the chosen type, the catalog task will be assigned to a particular group. This is fairly straightforward but I am phasing up on Flow. Any help is appreciated.
Type: Option 1 -> Assignment Group: Service Desk
Type: Option 2 --> Assignment Group: Credit Group
Else: Assignment Group: Help Desk
var service = fd_data.trigger.current.variables.type;
if(service == 'ftp1'){
task.assignment_group.setDisplayValue("Service Desk");
} else if(service == 'ftp2') {
task.assignment_group.setDisplayValue("Credit Group");
} else{
task.assignment_group.setDisplayValue("Help Desk");
}
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 09:32 PM
you can use get catalog variable action to get all variable details and then use this action variables in the create catalog task script it will look something like this
in the above screenshot i am passing 3 variables of standard laptop SR and now i will use acrobat variable in create catalog task action like this
so in your case u need to first get the catalog variable and then update your script something like this
var service = fd_data._1__get_catalog_variables.type;
if(service == 'ftp1'){
return "sys_id of group";
} else if(service == 'ftp2') {
return "sys_id of group";
} else{
return "sys_id of group";
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 07:20 AM
you are using task object which is not valid in flow script, u can to return the sys_id of the groups like this
var service = fd_data.trigger.current.variables.type;
if(service == 'ftp1'){
return "sys_id of group";
} else if(service == 'ftp2') {
return "sys_id of group";
} else{
return "sys_id of group";
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 07:51 AM
Thank you this works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 09:40 AM
I tried do another test but it is not returning the correct groups. Can you help check my variables it seems that it is not getting the correct value to compare.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 09:32 PM
you can use get catalog variable action to get all variable details and then use this action variables in the create catalog task script it will look something like this
in the above screenshot i am passing 3 variables of standard laptop SR and now i will use acrobat variable in create catalog task action like this
so in your case u need to first get the catalog variable and then update your script something like this
var service = fd_data._1__get_catalog_variables.type;
if(service == 'ftp1'){
return "sys_id of group";
} else if(service == 'ftp2') {
return "sys_id of group";
} else{
return "sys_id of group";
}