Constraint Question

Can someone tell me why this wont work?

‘{ENTITY STATE:Status}’ == ‘New Orders’

It does not allow the message rule to fire no matter what the sate of the entity is.

If I change it to ‘{ENTITY STATE:Status}’ != ‘New Orders’

I can get the message that shows the entity name and the state and again it doesnt matter if the state is New Orders or Available or whatever… The string for {ENTITY STATE:Status} works for showing me what the state is when the message does fire so im not sure why its not able to match it in the constraint.

Also the load entity command value is from a ask question button and if i dont constrain the rules or do != everything works. The constraint doesnt.

image

All Constraints are ran/checked before the rule is fired. In your case:

is a true statement (before any action is ran), therefore it will fire, showing you the “Table Show Message” after loading the entity action.

You will need to pass the values to a new rule or get the values from the previous rule.

As said above, it’s because action constraints are worked out at start, not in order as actions happen, so the entity hasnt been loaded when it decides action constraint, no entity means no state hence != working
You would need to load entity then use an execute automation command to trigger a seccond rule with your entity related actions there.
Or depending on your preceding automation flow you might look to change it to an entity selected/updated type with it’s own rule constraints to fit scenario.

1 Like

Or, you could possibly change to use report expression with entity name=command value in expression as unlike simple entity state expression which needs a ‘link’ through load/ticket in use report expression can report direct from entity regardless of if its loaded or set on a ticket.

What would that look like? Is there a way to add a status to a automation command widget button like the entity buttons? I know theres a way to add a automation command to a entity button but you cant assign a command value which would be pretty cool.

You can separate the Automation Command and the Command Value with a “:”.
Example: Test Button:Table 1.
It doesn’t appear that you can use any tags for the command value.

1 Like

Command value on a entity screen button? There is a field in the options for this already no?

In regards status on automation command, if your thinking what I recon you are to try and pass the status in the command value that wouldn’t work, has the same issue, you can use in entity button as entity button has a link to an entity as it’s a button for a specific entity, a command value again doesnt unless you as I said before you have an active ticket with an entity or specify an entity in expression.

If this is part of your seated setup, have you considered maybe just selecting the entity and opening the ticket/menu screen? This would start a ticket and give a link. A button would then allow the selected entity to be worked on even without any orders.
I’m not sure if this would use a ticket number though if that was an issue for you.