Different print output depending on a variable
Hello there,
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%.
for example:
%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.
for example:
%printId% = PRINTER03 - This printer does not exist, print by PRINTER01
Thanks!
-
Peter Thane
★ BarTender Hero ★
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 not
1 -
Raul Jimenez
★ BarTender Hero ★
not valid for my case, printers always exist and i need to discriminate it by variable within integration
-1 -
Peter Thane
★ BarTender Hero ★
Confused, you said it doesn't exist initially
0 -
Raul Jimenez
★ BarTender Hero ★
Hello there,
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 printer
1 -
Peter Thane
★ BarTender Hero ★
Hi Raul,
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 -
Hello Raul,
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 -
Raul Jimenez
★ BarTender Hero ★
Hi Laura,
the solution may be good, I perform four configurations and checks and I send you feedback
Thank you
0 -
Raul Jimenez
★ BarTender Hero ★
Hello,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 -
Raul Jimenez
★ BarTender Hero ★
in the end I have solved it by putting a condition in the action of printing
0
Vous devez vous connecter pour laisser un commentaire.
Commentaires
9 commentaires