in Catlog form there are 2 variables application owner and custodian

srikanthr066535
Tera Contributor

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:

 
approvers.push(current.variables.application_custodian.toString());
approvers.push(current.variables.application_owner.toString());
   
6 REPLIES 6

Rafael Batistot
Kilo Patron

Hi @srikanthr066535 

 

If you are using workflow editor to approval via script may you use:

 

If the Advanced check box is selected, this script is called to determine any additional user approvals to be created. The script needs to set the variable answer to a comma-separated list of user ids and group ids or an array of user and group ids to add as approvers. For example:
Explain this code
answer = [];
       answer.push('id1');
       answer.push('id2');
 
to send the user i, use: 
 
current.variables.<name_of_item_variable>

 

 

PrasadShelar
Tera Contributor

Hello @srikanthr066535 ,

To send approvals to users selected in catalog variables such as "application owner" and "custodian" (both referencing the user table), please use this.

Steps:

  1. Set the trigger as "Catalog" in Flow Designer.
  2. Add the "Get Catalog Variables" action. This will make all your catalog variables, including user references, available as data pills.
  3. Add the "Ask for Approval" action. In the "Users/Groups to Approve" field, use the Data Pill Picker to select the required variables from the output of the previous step.
  4. For parallel approvals, use the AND option to add multiple variables.
  5. Use conditions to handle approval or rejection as required

Let me know if you need additional help. 

 

Please hit the like button and accept this as the solution if it helped you.

By the way, my replies/reply might show up a bit late as they are waiting for community approval. Thanks for your patience!

 

regards,

Prasad