Additional approvers script

chrisdamico
Kilo Explorer

I have a variable on the catalog form; Business Unit CFO Approver (value is cfo_approver).   It's a reference to a table that has a list of the CFO's.  

In my workflow, I want to include the CFO as an approver.   In a Approval - User activity, I used the additional approvers script and added:

answer = current.variables.cfo_approver;

This is not working.   Please help.

13 REPLIES 13

veena_kvkk88
Mega Guru

Hi Chris,



Try this:



var answer = [];


answer.push(current.variables.cfo_approver);


Thanks.



Unfortunately this did not work.   It's just bypassing the approval step and automatically approving it.


Could you try and log the value of current.variables.cfo_approver somewhere in scratchpad or in logs to make sure the value is captured right?


I added this.



gs.log("current cfo approver "+ current.variables.cfo_approver);


var answer = [];


answer.push(current.variables.cfo_approver);



The log shows:



current cfo approver 14a5202e13dd7e00c4cbff82e144b0f1