Trigger to change entity state

Hi,
I tried to create a trigger that change the entity states of my tickets on kitchen.
This option help me to know the cooking time elapsed, but I don´t know how.
I programmed the trigger. See next image, but this not work properly.
Can you help me, please?


Kitchen states “Cooking06” and “Cooking10” have yellow and red color respectively.
I configured a entity screen where I show the tickets to kitchen and the tables related to the tickets.
My idea is that after 6 minutes the entity change to Cooking06 state and after 10 minutes change to Cooking10.
This option showing to kitchen people that they are on time or not more graphically like show in the next picture.

I don’t see the trigger. You did create a start and stop trigger?

Hi, one update,
The Entity Name=B10 is to enforce the change, and tried with to many custom constraints with out results.
Thank

Rolbin

The trigger is basic.

Hi ,
I program the trigger every minute with the idea of showing on the screen when they change.
Thanks

I don’t think that constraint syntax is right. I would just use custom constraints and use 2 rules.

Hi @Jesse, thanks for your answer,
I agree wtih you.
The problem is that I have tried a lot of options, or configurations.
I create 1 rule and try with custom constraints like my last example.
Also create 2 rules…one by state… and nothing!
I have tried with 10 rules…thinking to moved step by step, state from Cooking to Cooking02,Cooking03 and even to Cooking10, but nothing.

At this time i really need help.
I began with SambaPos this week and I understood it very good most of the options and logic, but in this case, I don’t know how to do it.

My logic tells me that I need:

  1. Create a cursor to select the tickets that are in kitchen.
  2. Make a cycle to assess the time spent on each ticket and if it is >=6 and <10 the first change of state is established .
    If not , evaluate if the time is >=10 to switch to the second state .
    Also, I think that I need to run a trigger every minute update the state if the conditions are met, but I don´t know how do it.

Hi @Jesse,
Reading another question called: Use of constraints, @emre write:

However I’ve noticed you’re executing it through a trigger. {PRICE TAG} is a order related tag so it won’t work.

Reading the @emre answerd, I think it’s a similar situation with my question. I am trying to update a state through a trigger but it not is possible.

You do not need to use a trigger to determine time spent in kitchen. One minute let me look it up…

did you not see this?

He already gave you how to do duration.

Sometimes our logic doesn’t really mean anything to a computer that does not know our logic. :stuck_out_tongue:

No trigger just use the tags…

Custom constraint for example… {TICKET STATE MINUTES:Status} Greater 10 change state

{TICKET STATE MINUTES:Status} Greater 20 Change state… etc.

What do you mean by this? I dont think I can think of any reason why I would create a cursor…

Disculpame si le doy tantas vueltas a este tema. Estoy tratando de explicarme para ver como lo puedo resolver.
I understood of @emre and you that not is possible change the color of the tickets in the ticket list, at least not yet. Maybe I don’t understood well.
Based on your answers , I tried to create my own traffic light to show the elapsed time based on the {TICKET STATE MINUTES:State} of each ticket to change the entity state like I show you in the next picture, but I need that the colors (entity state of the tables) change automaticly. That is the reason because i tried to use a rule with a trigger every minute.

Oh , Oh … I wrote to you in Spanish
Excuse me if I give many turns to this topic . I’m trying to explain to see how I can solve it .

Hi @Jesse,

Any idea that show me the right path?

I love your ideas!

Did you get the tables to change colour, did you get the time to display correctly?

Could you please show me so how I could duplicate?

Is there a tutorial for this?

Thanks stephanhenning

I created three areas or regions in the kitchen display.
Each region have a filter to show the orders that I need in an special format. (excuse me my english).
I show in the next image.


You first need create the kitchen display based in the tutorial.
Next, adjust and set the three areas.
This is the settings of the top-left area.


This is the settings of the bottom-left area.


And finally the big area have this parameters.


For me, the magic are in the filters and the format…work for me!.
The filters show only the orders in the range.
The three areas have the parameter: Order by name value set to: Last Order.

I thought I should let you know that the changing colors and timers will be possible in version 5 when its released. I’ll show you an example in a few minutes.

This is just one template that was used to demonstrate some new functions coming with v5.

Another users version:

The color changes are dynamic so when specific time is met it changes color. Can be text or background as shown.
So as you can see we have some great new features coming with V5 when it releases pertaining to Ticket Lister.

2 Likes

wow…wow…wow… :slight_smile: :slight_smile: :slight_smile: :slight_smile: :smile:

I’m so happy… Thanks kendash.

1 Like

Just so you are aware @stephanhenning, those 3 “regions” are all Ticket Lister Widgets.

Yes, it is awesome.

It is very cool. The screenshots that @Jesse shows are Ticket Lister Widgets. That Widget really got an overhaul in V5 and it is very dynamic (and colorful too) if you wish it to be that way. Even better is that they update on the fly with tags like Entity State, Ticket State, Order State, Entity State Minutes, Ticket State Minutes, Order State Minutes, etc.

2 Likes