I have %1 set to the user ID number which is a value read from the XML in the input source. I validate this by a branch outputting to file with the filename %1; works fine, and the file is a PDF. I then immediately print to a windows printer using the Windows generic 35 ppm PCL printer with the “job owner name” field set to %1. I expect to see in the job PJL header a line like
@PJL SET USERNAME=“1093847097” , but instead I see
@PJL AUXJOBINFO UserName=“myname” , (the name I am logged in under).
First, “AUXJOBINFO UserName=” isn’t how PJL normally is going to declare the user, and I expect this might not work with some software or printers. Secondly, if it’s going to put in the name I’m logged in under, why give me a field and prompt me for variables? So, I’m doing something wrong. I’ve looked at it for too many hours. It’s got to be simple.
So what is it?
Did you try using another jobinfo variable, say %9 ? Maybe %1 got overwritten by a plugin in your process before it’s sent to the printer.
The last thing I do before sending to the print queue is to write the file out to a folder as a test, and I name the file using the %1, which works.
OK, I see that I might be doing this the wrong way anyway. I use “set job infos and variables” and then “get data location” and pick the XML variable I want. However, when I save and reopen the configuration I see the reference has been replaced with the hardcoded value that was in the sample data. This never changes when the data changes.
So, what is the best way to read a value to be used by the workflow later?
The behavior you describes for the hardcoded value would be normal if you used “Get Data Value” instead of “Get Data Location”. Can you double-check this? They both open the same UI so it can be tricky.