Flow Designer and scripting Ask for Approval

david_legrand
Kilo Sage

Hi community,

Has anyone tried to use the "scripted rules" on the Ask for approval? Because my flow won't be as simple as "take a user in a predefined field"...

I can't find what the rule is expecting 😕

find_real_file.png

1 ACCEPTED SOLUTION

Thanks, We just had to learn to create subflows/actions for everything we needed to have.

I'll use Flow but I still like Workflow for its responsiveness and easiness to script... 🙂

View solution in original post

12 REPLIES 12

AnassC
Tera Contributor

Hi Kilo,
Check this out, it will help you.

AnassC_0-1765458462097.png

The full details in this link : https://www.servicenow.com/community/workflow-automation-blogs/scripted-approvals-in-flow-designer-w...

AnassC
Tera Contributor

Hi Tera,
Check this out, it will help you.

AnassC_0-1765458462097.png

The full details in this link : https://www.servicenow.com/community/workflow-automation-blogs/scripted-approvals-in-flow-designer-w...

Chiranjeevi Go1
Giga Expert

Hi David, 

Have you figured out how to script for Ask for approval action to get the approvers using the script?

I have a requirement to pull the approvers from a custom table and not sure how to script in the ask for approval action. 

Thank you.

JC Icaro1
Kilo Guru

In case this helps someone, I think you need to test the flow and look at the Runtime Value to determine what needs to be returned by the script. In my example below,

find_real_file.png

 

Here's the script I used:

find_real_file.png

When I tested this, it created sys_approval records for the users with those sys_ids.

Thank you, it helped!