- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 03:39 AM
Hi I am creating a flow which is triggered when a catalog item is requested. This is a simplified version of what I am trying to achieve:
- Request is looked > flow is triggered
- Flow looks at team name variable
- Takes the team name data and finds relevant entry for it in a associated table
- The table contains an approval group linked to that team
- Flow generates approval requests for the requested item to that approval group.
It is the 2nd & 3rd point onwards I can't move past. How do you establish the link between the team name variable and the table?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 04:39 AM
Suggestion: create the team name variable as a reference to sys_user_groups which will make it easier
otherwise second approach should work
There are main 2 points to look into
1] If the team name variable is reference:
-simply use the Ask For Approval action
- select the record as your triggered record
- select the rule as Approve or Reject and approval rule as anyone approves or reject
- and in the field where we give the person or group, use the data pill picker to point your Team Name variable
2] If the variable is a string
- use a lookup record action
- use table as sys_user_group
- add the condition as a name is {use data pill picker and drop your team name variable}
now handle the error because if there are no grp present then this action will throw an error
- if the record is found then you can use the ask for approval action and in the data pill picker(see SS, you can drop the lookup for record-> group record)
Mark it as helpful if it worked
Gaurav Vaze
ServiceNow Developer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 04:22 AM
Is your 'team name' a reference or a string? If it's a reference, your approval can just go to the team_record.approval_group. If it's a string, I hope the names are unique. You need to do a look up record to the team table where name is same as name in variable and then you can easily set the approval record to the approval_group of that record.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2024 04:39 AM
Suggestion: create the team name variable as a reference to sys_user_groups which will make it easier
otherwise second approach should work
There are main 2 points to look into
1] If the team name variable is reference:
-simply use the Ask For Approval action
- select the record as your triggered record
- select the rule as Approve or Reject and approval rule as anyone approves or reject
- and in the field where we give the person or group, use the data pill picker to point your Team Name variable
2] If the variable is a string
- use a lookup record action
- use table as sys_user_group
- add the condition as a name is {use data pill picker and drop your team name variable}
now handle the error because if there are no grp present then this action will throw an error
- if the record is found then you can use the ask for approval action and in the data pill picker(see SS, you can drop the lookup for record-> group record)
Mark it as helpful if it worked
Gaurav Vaze
ServiceNow Developer