Approval in a workflow on the orderguide is skipping

rachelconstanti
Mega Sage

Some background

 

We have an Onboarding Order Guide that has a variable set with standard questions. 

We have variables on the form for hardware and software selections. 

We need to have various people approve certain items.

 

If a Smartphone is selected we are prompting for project number and program manager.  Program manager auto populates based on the project number.  Program manager needs to approve the request for the Smartphone.  These are variables that are on the Orderguide (although this shouldn't matter).

 

This is how I have it scripted:

 

answer = [];
var program_manager = current.variables.program_manager; // get the variable value
answer.push(program_manager); // add the value to the array

 

It is skipping the approval and I am not sure why (I also have this same logic built into individual catalog items with no issues).

I have tried numerous variations of the above script with the same result - it skips the approval.

What do I need to change in the approval script to send the approval to the Program Manager (program manager is a field I needed to add to the cmn_cost_center table.   The name on the table is u_prog_manager_1.  

 

Any help or suggestions are appreciated.

Thank you,

Rachel

 

 

 

 

3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

Can you confirm, the script/workflow/flow designer you are running is on Requested Item table. 

If not and if it is on Request table, you may need to query the sc_req_item table and then get the value.

Also made a small change, can you try.

answer = [];
var program_manager = current.variables.program_manager+''; // get the variable value
answer.push(program_manager); // add the value to the array

 

 


Please mark this response as correct or helpful if it assisted you with your question.

The workflow is running on the requested item table.

I made the change but the result is the same - the approval gets skipped.

Would you be able to post a screenshot of the workflow?

Also can you confirm program_manager is a reference field pointing to the user table.


Please mark this response as correct or helpful if it assisted you with your question.