Tag query event driven

Hello, when a tag query is configure with event driven it means that the query is fire when the event happen but which event ? When the tag is read? Could we configure this event?
Thank for help.

Event driven relies on a change to some other tag referenced in your query binding. So if your query takes an integer parameter and you tie that to another tag, a change to that integer tag will trigger your query again.

It work well. Thank.

@pturmel Hi again
what about scenario when my query tag is using “select * from table_view”.
How to trigger an expensive dataset query only when it is truly needed?
I tried to add "where " statement to the end of my query to read the value of the memory tag but i dont see the dataset being refreshed :frowning:

Don’t use a query tag. Use a simple Dataset memory tag that is written only by a script. Use any desired combinations of events to decide when to call the update script. If using Vision, use a gateway message handler to actually call the script.


thanks Phil it works beautifully

where can i see that example ?