Help with print ticket when table is changed

Continuing the discussion from Print on Table Changing:

Hi, the above topic is of Samba v4 and i’m using V5. I want to print ticket to respective printer when the table is changed.

i’ve 3 printers, kitchen/bar/sheesha. i followed the above post but not working can any one help…

below are screen shots

Your setting action fields dont seem to match that what you have set in the action where used in the rule…
Remove the action save and readd the action for one.

Also is TABLES NEW your entity type name for tables???

Do you really have Entity Type Name TABLES NEW?
What OLD TABLE NAME Update Program Setting do?
You name it TABLES NEW but value OldEntityName ???

oh i see ive made the changes . Also yes i’ve entity type as TABLES NEW. about old TABLE NAME UPDATE PROGRAME SETTINGS IVE FOLLOWED THE TUTORIAL. PLEASE CHECK THE SCREEN SHOTS IF ANY THING NEEDS TO BE CHANGED LET ME KNOW.

still cant figure out how to print when table is changed?

Your automation doesnt look right at all…

Entity Type Name = TABLES NEW? you have entity type called TABLES NEW?
{TICKET NO} is not null in theory is always as ticket number is available as soon as ticket is created…
Your update setting action doesnt seem to match, in screenshot you names both fields TABLES NEW but in the rule it shows TABLENO and OLDENTITYNAME.
Also would setting name not be TICKETNO rather than TABLENO
And aswell you have [:TABLES NEW] in the OLDENTITYNAME field but thats not a valid expression…

I would A check is any settings are being created by looking at DB using MSSQL Manager or add a pop/show message action to check the rule is firing.
I would guess your entity type is not TABLES NEW which is why the rule is not starting at all.

1 Like

Well thanks for your reply. yes i do have my Entity Type as “TABLES NEW”
What should be the {TICKET NO} is not null ? “Equals”?
I’ve made the changes in setting action fields, please check screen shot.
Setting Name changed to TableNo

“And aswell you have [:TABLES NEW] in the OLDENTITYNAME field but thats not a valid expression…”
what should be here?

You should put spaces in your field names [:xxx] for that reason, your field name is the same as a value for the rule which is what that message is.
Your setting surely would be name = [:Ticket ID] with {TICKET ID} in it for the rule to link the ‘old’ table number to the ticket (guessing you want to print the old and new table number on move?
I would sugest you add a prefix to the setting name to keep things organised ie; MoveTable-{TCIKET ID}
If you change to [:Old Entity Name] and then put [:OldEntityName] in the rule it should save the old table number to a setting value by the ticket ID
Im guessing your constraint should really be {TICKET ID} is not null - signifying that the ticket has already been submitted/printed to the kitchen.
As for the print… are you using the default kitchen print action? If so this is configured to only print NEW state orders - as your ticket has already been submitted/closed/printed the orders will not be new anymore and just moving the table will not actually print anything as there are no new orders to print.
Either create a separate template to say something like;
TABLE NUMBER {SETTING:MoveTable-{TICKET ID}}
MOVED TO
TABLE NUMBER {ENTITY NAME:NEW TABLES}
to just say the table has moved.
Alternativly you will need a seperate print action which sends all orders again (the issue with that is you dont want kitchen to count it as another ticket and make 2x the orders)

Thanks for your quick reply and sorry to bother you again, please check the screen shots if anything needs to change?
Also, ive made a template as you said. do i need to add print job ? to get them print at bar and kitchen?

If your putting the tags in the entity section of the template you just need {ENTITY NAME} rather than one specifying the type aswell.
That rule obviously isnt going to print anything at the moment.
To print that template you will need;
Template - got
Print Job (can set to bar printer aswell if want same printed to both)
Print Action (if its that template you shouldn’t need to set any state values etc.)
Also you didnt add the prefix to the update setting action or the rule (one or the other only).
If in action it would be MoveTable-[:Ticket ID] and just {TICKET ID} in the rule
or if in rule (reconmend as alreay in place) MoveTable-{TICKET ID}

Changes made as per your instruction please check screen shots. if any additional changes let me know. also
what u mean by To print that template you will need;
Template - got?

You have to learn the basic of creating Action/Rule first. Just study any tutorials out there first and see how the action was create and how to pass input in the rule.

The way you using {XXX} and [XXX] are all wrong. Pay attention to this brackets in tutorial.

[:XXX] is not refer to Program Setting. You should use {SETTING:XXX} instead of {:XXX} when you refer to program Setting.
[:XXX] are default parameter that available in that action Rule. You can see it by click dropdown list for that action within the rule.

3 Likes

I’m sorry but just tried to copy the values from the v4 post . if possible if u can share screen shot of the action and rule will be easier and it can be also used as a tutorial.

There is no difference in the workings of program settings and action field titles between v4 and v5…

To get a setting value use {SETTING:SettingName}

In an ACTION using [:SquareBrackets] carries the field into the rule so you can input variables in the rules or reuse an action in multiple rules.
These field names should not interfere with but in rule values which are also in square brackets.
Easiest option is to use multiple words with space as rule variables have no spaces.

In rules [:SquareBrackets] are rule specific variables like [:CommandValue] being the value passed to an automation command executed event rule.

Your posts show a right mix and misunderstanding of these fundamental aspects.

Either way a v4 tutorial will 99% of the time be exactly the same in v5. Tutorials are less backward compatable only due to use of new options in latest version. The basics and how things work are identical so working from v4 titorial is not your issue.

1 Like

Thanks for the reply, i’ve made some changes can u check if anything still wrong?

Notice the Action in the Rule still shows a parameter for TableNo even though you changed the Action to use Ticket ID instead.

Since you made changes to the Action, you should remove the Action from the Rule, then save the Rule, then add the Action back into the Rule and set the action parameters, then save the Rule again.

Now you should see the Action in the Rule shows a parameter for Ticket ID instead of TableNo.

My question is, when you say see anything wrong is it not working or have you not tried?
But as Q said and said before, if you change the action you need to remove, save then add back in.

yes i just took screen shots to show the parameters are in place or no? i can see the Ticket ID instead of TableNo. so now how about the template?

[LAYOUT]
<EB>
<T>TABLE CHANGED
<L00>Date:{TICKET DATE}
<L00>Time:{TIME}
<DB>

{ENTITIES}
<F>=
<L00>Ticket No:{TICKET ID}
<BEEP>
<B22>
[ENTITIES: TABLES NEW]
<J>Order Number:    {TICKET ID}
TABLE NUMBER {SETTING:MoveTable-{TICKET ID}}
MOVED TO
TABLE NUMBER {TABLES NEW}
[ENTITIES:TABLES NEW]
<J>Order Number:    {TICKET ID}
TABLE NUMBER {SETTING:MoveTable-{TICKET ID}}
MOVED TO
TABLE NUMBER {ENTITY NAME}

Thanks for your quick reply, i’ve made the changes but still can’t print or see the changes in preview. how to print it?