# Script Console - Named Query

**URL:** <https://forum.inductiveautomation.com/t/script-console-named-query/65847>\
**Category:** Ignition\
**Created:** [October 29, 2022, 11:59pm UTC](https://forum.inductiveautomation.com/t/script-console-named-query/65847 "2022-10-29T23:59:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dwoo](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@dwoo](https://forum.inductiveautomation.com/u/dwoo)\
**Post date:** [October 29, 2022, 11:59pm UTC](https://forum.inductiveautomation.com/t/script-console-named-query/65847/1 "2022-10-29T23:59:25Z")

</div>

I'm stumped on why it's giving me the error highlighted....The Named Query works fine when execute in  
the Nested Query Test window, now trying by calling in script and it's failing

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/2/12658cddd90281c61e319018093b4f768bba76ee.png)

more of the error

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/7/971a0861d3c5ed89c85aa3f1603e7a7b920ad4b6.png)

---

<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:** [October 30, 2022, 12:24am UTC](https://forum.inductiveautomation.com/t/script-console-named-query/65847/2 "2022-10-30T00:24:52Z")

</div>

You’re not providing the correct value types to the params.

I assume those strings are intended to be tag paths. You need to read in the tag values and then provide the actual values as the params.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 30, 2022, 12:29pm UTC](https://forum.inductiveautomation.com/t/script-console-named-query/65847/3 "2022-10-30T12:29:53Z")

</div>

As @lrose notes, putting a tagpath in a string doesn't magically cause that tag to be read. In jython, it is still just a string. Use `system.tag.readBlocking()` to obtain all of those tag values, then construct the params dictionary.

---

<div class="post-metadata">

**Author:** ![dwoo](https://avatars.discourse-cdn.com/v4/letter/d/bbce88/32.png) [@dwoo](https://forum.inductiveautomation.com/u/dwoo)\
**Post date:** [October 31, 2022, 12:13pm UTC](https://forum.inductiveautomation.com/t/script-console-named-query/65847/4 "2022-10-31T12:13:32Z")

</div>

Thanks, I already tried it and worked....both correct.
