# Trouble running an alarm notification block named query

**URL:** <https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238>\
**Category:** Ignition\
**Created:** [June 10, 2025, 4:29pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238 "2025-06-10T16:29:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![michael.black](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@michael.black](https://forum.inductiveautomation.com/u/michael.black)\
**Post date:** [June 10, 2025, 4:29pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238/1 "2025-06-10T16:29:20Z")

</div>

I have two projects with one containing all my scripts, named queries, etc. I am trying to get an alarm notification block calculatedRoster running using a named query from the parent. I see the query within the child project that was inherited from the parent. when i run the same script in the console it returns the results I am expecting. I put essentially the same into the calculatedRoster script and I get no errors in the script. When I try to test the notification block I get the following issue:  
org.python.core.PyException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Project name required for script execution: the Gateway Scripting Project is not set.

I went into the gateway and made sure the gateway scripting project was set to the parent. I have also tried changing my runDBQuery to include and not include the parent in the path..including "Parent/namedquery" and also "Parent", "namedquery".

What am I missing?

---

<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:** [June 10, 2025, 4:33pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238/2 "2025-06-10T16:33:05Z")

</div>

> [@michael.black](#):
>
> when i run the same script in the console it returns the results I am expecting

The script console is Vision scope. Notification pipelines are Gateway scope. The function argument requirements are different. Look closer at the docs.

---

<div class="post-metadata">

**Author:** ![michael.black](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@michael.black](https://forum.inductiveautomation.com/u/michael.black)\
**Post date:** [June 10, 2025, 4:34pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238/3 "2025-06-10T16:34:20Z")

</div>

Are you talking about the system.db.runquery function?

---

<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:** [June 10, 2025, 4:47pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238/4 "2025-06-10T16:47:31Z")

</div>

No, because that doesn't run named queries.

---

<div class="post-metadata">

**Author:** ![michael.black](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@michael.black](https://forum.inductiveautomation.com/u/michael.black)\
**Post date:** [June 10, 2025, 4:54pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238/5 "2025-06-10T16:54:19Z")

</div>

I meant system.db.runNamedQuery

---

<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:** [June 10, 2025, 4:58pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238/6 "2025-06-10T16:58:16Z")

</div>

Yes. Look closer at the docs, in regards to scope.

---

<div class="post-metadata">

**Author:** ![michael.black](https://avatars.discourse-cdn.com/v4/letter/m/ee7513/32.png) [@michael.black](https://forum.inductiveautomation.com/u/michael.black)\
**Post date:** [June 10, 2025, 5:02pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238/7 "2025-06-10T17:02:43Z")

</div>

Thanks. I did. I no longer get that message because I included the project name in the query. I now get a error telling me its getting a string instead of a dictionary.

---

<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:** [June 10, 2025, 5:05pm UTC](https://forum.inductiveautomation.com/t/trouble-running-an-alarm-notification-block-named-query/107238/8 "2025-06-10T17:05:34Z")

</div>

You'll now have to share your code. Please format it for readability.

(Please see [https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831.](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831.))
