Approval in Flow not triggering

riskay123
Mega Guru

I am trying to use Flow Designer for a catalog item for the first time and I have a question around approvals.

 

The new catalog item contains a variable set that is already used in many other forms. These existing catalog items use workflows that contain approvals that have scripts that reference this variable set.

Variable Set

Variable set.JPG

Workflow Script

Workflow script.JPG

I thought it would be just a matter of adding the same script to the flow and it would work but it does not seem to trigger any approvals when I run it. Can anyone tell me where I am going wrong. Have I put the script in the correct place?

 

Approval in Flow Designer

Approval in Flow Designer.JPG

 

Error when I run Test

Error log from test.JPG

 

 

 

 

1 ACCEPTED SOLUTION

Hi Vasanthariajan,

 

I got it to work!!!!

 

I changed the drag and drop from your original suggestion

Image3.JPG

 

to this and BINGO!

 

Image4.JPG

Thanks so much for your help Vasantharijan and taking the time to answer my question. I really appreciate it. 

 

View solution in original post

11 REPLIES 11

Vasantharajan N
Giga Sage
Giga Sage

 

Please use the below syntax for the rules which returns the approvers from the variable value. Please replace the variable_name value with your actual variable and try.

 

 

return "ApprovesRejectsAnyU["+fd_data.trigger.current.variables.variable_name+"]";

VasantharajanN_0-1671429533128.png

 

 

 


Thanks & Regards,
Vasanth

Thanks for your reply  Vasantharijan. I have tried your suggestion but it still does not work. Sorry I am not very good when it comes to scripting.

Script2.JPG

 

As you are using Get Catalog Variable action in Step 1.  So please use the below syntax

return "ApprovesRejectsAnyU["+fd_data._1__get_catalog_variables.select_approvers_from_list_SM+"]";

 

Please refer to the screenshot below. 

VasantharajanN_0-1671517190525.png

 


Thanks & Regards,
Vasanth

Hi Vasantharijan,

I tried making the suggested changes but the approval still does not trigger.  I get this error.

Script3.JPG