How to assign assignment group into task through flow design

BanuMahalakshmi
Tera Contributor

Hi,

 

Please advise the script to populate assignment group value depands on the field value: below is the criteria:

 

1. When the field name Site contains any of the values listed in the new system property(value - ACC,AFE,ATC,DPW,KIT,LAN,SZE,TEN), then assignment group is: App - Network.

 

BanuMahalakshmi_0-1741178712411.png

 

2. Otherwise, assignment group is local support group of the location in Site form field. Site field values coming from Location table.

3. If location does not have a local support group defined, then assignment group is App-Network.

Thanks.

3 REPLIES 3

J Siva
Tera Sage

Hi @BanuMahalakshmi 
First create one local flow variable of type Reference.Group.
Then do the validations,
if siteValue.indexOf(gs.getProperty('<sys property name'>))>-1) or siteValue doesn't has local group , then assign the value of flow variable as App - Network.

 

else if siteValue has local support group, then assign the value of flow variable as local group.

 

HI @BanuMahalakshmi 
In your flow you must have Get Catalog Variables action to fetch all the variable details from the RITM.
So, add "Get Catalog Variables" as a first action in your flow after trigger condition.
Ex:

JSiva_0-1741414335554.png

 


Instead of using,

 

 

var site = fd_data.trigger.request_item.variables.site;

 

 

you must use ,

 

 

var site = fd_data._1__get_catalog_variables.site;

 

 

Please note that, in _1__get_catalog_variables, the highlighted number denoted the step number. So the number may vary based on the step number

Ankur Bawiskar
Tera Patron
Tera Patron

@BanuMahalakshmi 

you can use flow variable and get the actual group to set.
Then use Update Record action and set the group with this Flow variable

what did you start with and where are you stuck?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader