# Tag change script calls named query which references.... EDIT: NOTHINGBURGER

**URL:** <https://forum.inductiveautomation.com/t/tag-change-script-calls-named-query-which-references-edit-nothingburger/61568>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [July 6, 2022, 3:11pm UTC](https://forum.inductiveautomation.com/t/tag-change-script-calls-named-query-which-references-edit-nothingburger/61568 "2022-07-06T15:11:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexZanduR](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alexzandur/32/31297_2.png) [@AlexZanduR](https://forum.inductiveautomation.com/u/AlexZanduR)\
**Post date:** [July 6, 2022, 3:11pm UTC](https://forum.inductiveautomation.com/t/tag-change-script-calls-named-query-which-references-edit-nothingburger/61568/1 "2022-07-06T15:11:52Z")

</div>

I am curious to if there are risks to the setup we have in recording finished product, as I just noticed the person before me used a named query that references a table component in the below.

**STEPS:**

1. Boolean tag used to trigger when a product is finished (passed audit)
2. Script gathers product details and checks if serial already exists using named query  
**- serial exists named query references “{table}” component**
3. Another named query inside script writes to SQL database

**QUESTION:**  
With the Serial Exists named query referencing a table component, does this pose a risk to our data integrity if no clients were open running the vision project?

Thanks!

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 6, 2022, 3:24pm UTC](https://forum.inductiveautomation.com/t/tag-change-script-calls-named-query-which-references-edit-nothingburger/61568/2 "2022-07-06T15:24:42Z")

</div>

Neither a Tag Change Script nor a Named Query can reference a UI component directly. A script on a vision window could use a value from a UI component as a parameter in a Named Query, but that isn’t the same as what you are proposing.

What you have said is happening, can not possibly happen. Named Queries exist outside of vision windows.

I suspect that a parameter is being sent to the named query. With out seeing the Named Query definition and the script, we couldn’t hope to tell you more.

---

<div class="post-metadata">

**Author:** ![AlexZanduR](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alexzandur/32/31297_2.png) [@AlexZanduR](https://forum.inductiveautomation.com/u/AlexZanduR)\
**Post date:** [July 6, 2022, 3:37pm UTC](https://forum.inductiveautomation.com/t/tag-change-script-calls-named-query-which-references-edit-nothingburger/61568/3 "2022-07-06T15:37:00Z")

</div>

🤦‍♂️ lol. Yeah, it is just a parameter.

I convinced myself he knew a way to reference a component in a named query, and was then focused on how it could even work and the risk it posed.

Again, thanks
