Different print output depending on a variable
I receive a JSON with the variable %printId%. This variable discriminates against me the printing by different printers that have the same name as% printId%.
%printId% = PRINTER01 - printer number 1
%printId% = PRINTER02 - printer number 2
I need that, if the name of %printId% is not like the name of the printer, it prints by a different one.
%printId% = PRINTER03 - This printer does not exist, print by PRINTER01
You can configure failover and redirection settings for printers in Admin Console but I believe that only works if the printer already exists and not if it does not1
not valid for my case, printers always exist and i need to discriminate it by variable within integration-1
Confused, you said it doesn't exist initially0
I have not indicated that the printer does not exist. what I need is that if it is not in a list of users (in my case variables), it leaves for another printer1
In yous first message you said
"%printId% = PRINTER03 - This printer does not exist, print by PRINTER01"
but later said
"for my case, printers always exist"
hence the confusion.
As mentioned above if the printer DOES exist then you could configure the failover and redirection settings but if it DOES NOT then that is not possible in which case you would need to make sure that the JSON parameter is correct by configuring your software that create the JSON commands to always reference a valid printer.-1
Thank you for your comment.
I am not certain I completely understood the solution you want to build but, in case this might help, besides using the printer redirection in Administration Console (which could be a really straight forward way of redirecting the print jobs to another printer), within the Integration you have option to execute an action conditionally (so based on an expression).
Taking this into account, before your Print Action you could set up another action (for example a Powershell script) that could be executed conditionally (or that could be executed always but it would be in charge of doing the printer checks required)
Let me know if this helps.0
the solution may be good, I perform four configurations and checks and I send you feedback
I have tried various things but it doesn't work.
What I am trying to do is the following:
if %tasklocatorfrom% starts with "PCK-PC / BOX" %printUser% = SORT01 elseif %printUser% = (JSON response from %printUser%)0
in the end I have solved it by putting a condition in the action of printing0