Is it possible to print out variables in workflow to the workflow low?

joshua18
Giga Expert

I'm trying to figure out in a workflow why an Approval process is being skipped. I'm assuming the variable I'm trying to use for the user doesn't have the right value but I can't seem to find away to print so I can go from there.

1 ACCEPTED SOLUTION

Might be silly question but is the user you're selecting for approval an active user?



Also, if you want to print the value of the variable, you can do this in the background script with an RITM that has already been created but not working correctly.



var gr = new GlideRecord("sc_req_item");


gr.get("SYS_ID_OF_RITM_HERE");



gs.log("Line Manager: " + gr.variables.u_manager_approval);


View solution in original post

12 REPLIES 12

Can you show a screenshot of the entire workflow? Do you have other approvals in the workflow?


Yes there are other approvals but it is the first one.



Tech request wf help.PNG


Might be silly question but is the user you're selecting for approval an active user?



Also, if you want to print the value of the variable, you can do this in the background script with an RITM that has already been created but not working correctly.



var gr = new GlideRecord("sc_req_item");


gr.get("SYS_ID_OF_RITM_HERE");



gs.log("Line Manager: " + gr.variables.u_manager_approval);


Yes they are active. I'll try that code,


I went to the sys_target table and set it to run only once. Where should I see log? Sorry, I'm a noob at this haha. I had to even Google how to make a background script.