Additional approvers script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 10:46 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 10:53 AM
Hi Chris,
Try this:
var answer = [];
answer.push(current.variables.cfo_approver);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 11:14 AM
Thanks.
Unfortunately this did not work. It's just bypassing the approval step and automatically approving it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 11:16 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2017 11:25 AM
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