answer = ifScript(); function ifScript() { if(current.additional_approvers != ''){ var arrlength = current.additional_approvers.split(','); if (workflow.scratchpad.approval_length < arrlength.length) { // if(workflow.scratchpad.approval_length == 0){ // workflow.scratchpad.approver = arrlength[workflow.scratchpad.approval_length]; // } // else{ // workflow.scratchpad.approver += ',' + arrlength[workflow.scratchpad.approval_length]; // } workflow.scratchpad.approver = arrlength[workflow.scratchpad.approval_length]; workflow.scratchpad.approval_length++; return 'yes'; } } return 'no'; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter