in Catlog form there are 2 variables application owner and custodian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
in Catlog form there are 2 variables application owner and custodian both are refernce to user table i want to send approvals to those users.
i am using below code in approval activity but not working:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
- Hello @srikanthr066535
Directly we can't send approvals like this you mention - approvers.push(current.variables.application_custodian.toString());
- approvers.push(current.variables.application_owner.toString());
- instead of this please try to use below things.
please try to use the Get Catalog Variables action in flow designer and then you can use this in ask for approval action whatever approval you want from the variables.
In the output of “Get Catalog Variables” action, you will now see all catalog variables available.
- These values are now available as data pills in Flow Designer.
Now add Ask for Approval action in your flow.
In the Users/Groups to Approve field, drag the variable pills (like application_custodian and application_owner) from the Get Catalog Variables step.
This way, those users will get the approval.
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hello @srikanthr066535,
Using Flow Designer
Trigger
Set the trigger as Catalog.
Step 1 – Get Catalog Variables
Add the Get Catalog Variables action.
Move the required variables into the slush bucket for easy selection later.
Step 2 – Ask for Approval
Add the Ask for Approval action.
In the Approval step, click on the Data Pill Picker.
Dot-walk from the Get Catalog Variables action to select the specific variable(s) needed.
Parallel Approvals
If you want approvals to be sent in parallel, click AND to add another approval branch.
Repeat the dot-walking process to select the variables for the second (or more) approvals.
Condition Handling
Use an If condition to check whether the request was approved or rejected and take subsequent actions accordingly.
Please mark my answer as accepted solution and give thumbs up, if it helps you.
Regards,
Naveen G N
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Why not use the OOTB flow along with the existing OOTB table to add the approval layers, instead of modifying the flow? This way, future changes will be easier and more scalable.
Please check this post:
Set Up "Step Based Request Fulfillment" for Catalo... - ServiceNow Community
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
The syntax you are using is of workflow approval activity. Are you using workflow or Flow designer? because this will not work in flow designer approval activity.
if you are using flow designer, you need to use “get catalog variable” activity 1st and then send approvals by selecting the variables.
If you are using workflow, your code should work in user approver activity.