Update Query Tag

Hi,
I have a toggle switch in a Perspective view that is bound to a query tag. The query tag’s execution mode is set to a Tag Group that updates every 1 minute.

When the value changes on the toggle switch, it is immediately written to the database with the new value. However, the query tag does not reflect the updated value from the database until the Tag Group executes again.

Because of this, if the binding refreshes before the Tag Group updates, the toggle switch may display an incorrect value from the query tag.

What is the correct way to handle this?

Don't use a query tag.

Database queries used in a UI should be named queries. UI bindings can be refreshed.

But consider pointing the toggle at a boolean tag, and arranging for the boolean tag to write to the database on change. (Use the Store and Forward scripting function.) No delays and no query at all.

3 Likes