# Ignition small unpredictable issues

**URL:** <https://forum.inductiveautomation.com/t/ignition-small-unpredictable-issues/100086>\
**Category:** Ignition\
**Tags:** ignition81, perspective, scripting\
**Created:** [December 20, 2024, 9:29am UTC](https://forum.inductiveautomation.com/t/ignition-small-unpredictable-issues/100086 "2024-12-20T09:29:33Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 2, 2025, 9:29am UTC](https://forum.inductiveautomation.com/t/ignition-small-unpredictable-issues/100086/5 "2025-01-02T09:29:42Z")

</div>

Show us your tag event script. This should not run any database queries directly.

> [@Refresh or update a query tag](https://forum.inductiveautomation.com/t/refresh-or-update-a-query-tag/78361/4):
>
> Two issues: When running a tag event, the script is outside any normal project scope, and therefore has no default database. The optional parameter to system.db.runQuery for the database is not optional in this situation. Running any kind of database query, unless it always executes extremely quickly (single-digit milliseconds), is inappropriate in tag event scripts. Use a gateway tag change script instead (in the project, subscribed to the reference tag, not on the reference tag). { …

---

_[View the full topic](https://forum.inductiveautomation.com/t/ignition-small-unpredictable-issues/100086)._
