Loop through all tickets

Hello everyone,

I was wondering if SambaPOS is giving me the ability to use Loop Values Action Type in order to loop through all Unpaid tickets and then using the Value Looped Rule to update one ticket Tag. I have been trying it this way with no success but there is a high possibility that i have been using the variables wrong as I am not so sure that I completely understand SambaPOS Database Schema.

So the USE CASE is: Automation Command (from custom entity screen for instance) -> Loop Through Unpaid Tickets -> Update Ticket Tag.

Am I trying something that cannot be done without modifying the source code?
In case it can be done, am I at the right way or something like this can be achieved otherwise?

Thanks in advance,

Alkis

Ticket lister widget can display only unpaid tickets and send all selected ticket’s Id’s to an automation command as command value. You need to enable multi selection on ticket lister widget and define a command in command list. Ticket lister will show a button for that command and you can pass command value to a value looper. In value looped rule you need to load ticket by id, modify ticket and close it.

If you have a lot of tickets you can define a command line as Select All. That will not mapped to a command but will select all tickets displayed in ticket lister.

We’ve previously talked about it here

This post may also help

Pretty descriptive! Achieved the USE CASE in minutes after trying for days!
Also very immediate response @emre. Thank you.

You guys out there, do not hesitate to use this amazing software, it can do more than you have ever imagined!!!
And with this kind of support… it is gonna be huge!

Edit: @emre, using search tags like “loop through all ticket”, “ticket loop”, etc I never reached the posts you pointed out, either from google or forum search. You might wanna consider that. Cheers again. :smile: