# Named query in timer script

**URL:** <https://forum.inductiveautomation.com/t/named-query-in-timer-script/19917>\
**Category:** Ignition\
**Created:** [October 1, 2018, 6:03pm UTC](https://forum.inductiveautomation.com/t/named-query-in-timer-script/19917 "2018-10-01T18:03:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claus\_Nielsen](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Claus\_Nielsen](https://forum.inductiveautomation.com/u/Claus_Nielsen)\
**Post date:** [October 1, 2018, 6:03pm UTC](https://forum.inductiveautomation.com/t/named-query-in-timer-script/19917/1 "2018-10-01T18:03:32Z")

</div>

Getting an error when trying to call a named query from a client timer script. The script works when called from e.g. the script console, a button or another thing called from the UI Thread, just not from the timer script.

Here’s the error

```auto
Traceback (most recent call last):

  File "<module:project.core.smartcardio>", line 125, in authenticate

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Named query smartcardio/AuthenticateCard not found

	caused by GatewayException: Named query smartcardio/AuthenticateCard not found
	caused by GatewayFunctionException: Named query smartcardio/AuthenticateCard not found

Ignition v7.9.9 (b2018081621)
Java: Oracle Corporation 1.8.0_171

```

I tried adding the project name, which doesn’t work, as the error suggests its a gateway exception. That just generates another mapping error, similar to this

[http://forum.inductiveautomation.com/t/cannot-coerce-value-named-query-path-into-type-interface-java-util-map/18042](http://forum.inductiveautomation.com/t/cannot-coerce-value-named-query-path-into-type-interface-java-util-map/18042)

Any suggestions on what’s wrong?

EDIT

Also tried to call it on the UI thread from the timer script, still the same.
