Yes, I know, I did not want to revert it to the “broken” version of Automation, sorry.
Yes, that was part of the issue, so I decided to store it in a Program Setting. At first I was using Local Variables, but could not get it working, so I went to DB settings because it is easy to see the values in the settings. It wasn’t until I found out that the nested settings were not working in the constraints, which was revealed by the Show Message Action. It still has me very puzzled, because I am sure I have done similar nesting in the past.
I will put together steps (rules) to reproduce this.
BTW @emre, the Event for Entity Updated is the one that does not have access to the Entity Name.
It has access to Entity Type, but not the Entity Name itself. This is why I am storing the Table Name when the Entity is selected, or when the Ticket Entity is changed. That way I have access to the Table Name via a Program Setting.
I wanted to use this in the Constraint, but it has no value for some reason:
{SETTING:OStatus_{SETTING:OStatus_Table}}
To reproduce this problem, remove the 2nd Constraint from the following Rule:
These 2 Show Message Actions are in the SAME RULE, as shown above. They both attempt to display the nested Setting {SETTING:OStatus_{SETTING:OStatus_Table}}, but only the 2nd Message contains a value for this Setting…
I’m trying to follow your solution above without much luck. There appears to be references to automation commands and actions in your solution which aren’t described here… Is there any chance you can past them here, or do an export of your config ?
That ^ should be self-explanatory. Go to Manage > Automation > Automation Commands and create a button. Map it to whereever you want (ie. Ticket, Under Ticket, Ticket Row2…)
This works really well… One thing I noticed however, is that the configuration you have above does not change the colour of the table once a new order is placed - it remains on the occupied colour, instead of showing the “new order” colour.
So i removed the constraints you added to the “Update New Order Entity Color” rule and left the “State Equals Unpaid” constraint only.
This allows the color to transition from occupied, to new order to bill printed in a more natural fashion.
I’ve enhanced what you have done here to add in a “reserved state” and created 3 buttons. 1. to set reserved, one to set occupied and one to set as available.
I want to only show these buttons based on the ostatus but the the “visible state” in the automation command doesn’t seem to response to ostatus. I set the ostatus to OStatus=Occupied for the “available” button …
Is there something i’m missing in setting the visibility correctly ?
@damian, if that is true (it makes sense), then you will need to set up an OStatus Ticket State and toggle it at the same time that you update the OStatus Entity State.
So i have a fresh install with a blank database been trying to get this to work but for the life of me i cannot. Not really understanding why because there are no other rules that should be affecting it. This seems to be a common problem tho from all the threads ive looked through. Could someone create a how to to explain and create a simple table occupied system. I plan to mainly use this for when a hostess seats a customer at a table before a order is taken. This is a pretty common flow for restaurants here in the US so would be nice to get this to work.