Printing multiple tables/entities


#1

my question is this, is it possible to execute print job of multiple tables at once?
Like in my restaurant at midnight i want a trigger that executes print job for every open table at that moment so that my waiters just need to grab there ticket and give to the client?

thanks


#2

Not as a single ticket but using a loop value action/rule you could probably feed in list of open ticket ids into print job which would print separate tickets which sounds more like what you want anyway.


#3

yeah it would be so every ticket comes out 1by1.

could you help me out a bit in how to setup such loop value?


#4

If I remember corectly it would start with the loop value action which is like an automation command action but you feed in a CSV list of values.
A second rule picks up the values one by ones inning the rule for each value.
So you need a report expression to return a comma seperated list of ticket ids for the open tickets or any constraint required.
The looped rule would only really need a print action specifying the ticket Id using whatever variable is provided in the loop value rule variable dropdown.


#5

The following shows use of the Loop Values Action and Value Looped Rule, which you will need to understand to make this happen.

It uses the Ticket List screen to select/generate the list of TicketIds, but you could instead generate the TicketIds list via Report Expression based on Ticket Status State "Unpaid" as @JTRTech mentions …


#6

thanks for the replies will try it out once im at the restaurant


#7

Turns out you don’t need any of that Loop stuff. This is very simple to do. This is the “magic” Report expression that will list your Unpaid Tickets …

{REPORT TICKET DETAILS:T.Id:(TS.Status=Unpaid OR TS.Status=Bill Requested):,}

You can see that ^ is constrained to list only Tickets having a Status State of "Unpaid" or "Bill Requested". You could add more constraints for Entity Type “Customers” or whatever you need.


POT Print Tickets [no Category] (Automation Command)

Name: POT Print Tickets
Category:
Button Header: Print Open Tickets
Color:
Font Size: 26
Confirmation: None
Values (0): (none)
Mappings
Terminal User Role Department Ticket Type Enabled States Visible States Visibility
* * * * * * Ticket

POT Print Tickets [Execute Print Job] (Action)

Action Name: POT Print Tickets
Action Type: Execute Print Job

Parameters:

Print Job Name: [:pjName]
Print Ticket: True
Update Ticket Number: False
Ticket Ids: [:ticketIds]
High Priority:
Order State Name:
Order State:
Order State Value:
Order Tag Name:
Order Tag Value:
Ignore Selected Orders:
Parameters:
Copies:

POT Print Tickets [Automation Command Executed] (Rule)

Rule Name: POT Print Tickets
Event Name: Automation Command Executed
Rule Tags:
Custom Constraint List (1):
Execute Rule if: Matches
Automation Command Name Equals POT Print Tickets

Actions (1):

POT Print Tickets

Constraint: (none)

pjName: Print Bill
ticketIds: {REPORT TICKET DETAILS:T.Id:(TS.Status=Unpaid OR TS.Status=Bill Requested):,}


#8

Nice, never realised or looked at trying feeding multiple ticket ids into the print action.
It clearly says Ids but never thought anything of it. :slight_smile:


#9

Wow never really look inside exec print job. Lot of features hidden here.


#10

hi just did your setup but for some reason it only prints ticket that is open and when i print from like say button in navigation menu it only prints a layout of ticket

here are my settings ( imo i dont think i missed something)

in ss below you see ticketids with capital letters have tried writing same as shown by QMcKay but that didnt fix it


#11

could only show 3pics as new user so will show rest here

when i used display on navigation like below it gives me the layout like you can see in second pic


hope you can help me figure out what i did wrong :sweat_smile:
and already thanks for all the help :smile:


#12

Your setup is correct.

I did not test the solution, but you are correct - it does not work.

No worries, we just add another Action, change our first Rule, and add a second Rule (tested) …

New Action Loop Values

image


Modify Rule for Automation Command Executed


New Rule for Value Looped

image


#13

only thing i had to modify @QMcKay was the automation command as when the mapping is set to “visibility>ticket” it will print open ticket for the amount of open tickets at that moment so i set it to “display on navigation” and then it works like intended.
thanks :smiley:


#14

How can we use it for selected tickets only on a ticket lister widget?


#15

The Ticket Lister Widget can fire an Automation Command, and by default, the [:CommandValue] that is passed to the Rule that handles the Automation Command will contain a list of Ticket Ids for the Tickets that are selected.

So you use the same sort of mechanism where you loop through the values supplied by [:CommandValue].