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

top_tanti
Tera Expert

Can you show us how you have the approval activity setup? Is it a reference type variable that you are trying to pull the user info from?


joshua18
Giga Expert

Here is a screenshot of the activity.



Capture.PNG


I added 'current.u_manager_approval' from the script tree. It is a reference field to our user table on our Requests so it shows the selected user's name.



Hopefully that helps. I'm new to development.


If u_manager_approval is a variable, try this:



answer.push(current.variables.u_manager_approval);


Unfortunately that also doesn't seem to work. I've used that for another workflow, which is why this is stumping me. Sure it's something simple.