# Fallback value of Named Query

**URL:** <https://forum.inductiveautomation.com/t/fallback-value-of-named-query/34562>\
**Category:** Ignition\
**Tags:** ignition79, vision\
**Created:** [May 8, 2020, 7:45am UTC](https://forum.inductiveautomation.com/t/fallback-value-of-named-query/34562 "2020-05-08T07:45:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 8, 2020, 7:45am UTC](https://forum.inductiveautomation.com/t/fallback-value-of-named-query/34562/1 "2020-05-08T07:45:18Z")

</div>

I can’t seem to find out where to set the fallback value for a Named Query…  
I need to be able to return a string value if no rows are returned. Did I miss something obvious?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 8, 2020, 2:47pm UTC](https://forum.inductiveautomation.com/t/fallback-value-of-named-query/34562/2 "2020-05-08T14:47:48Z")

</div>

Fallback is only an option on scalar queries, since they directly return a value, rather than a result set. You’d have to wrap runNamedQuery in a project scoped function if you want to specify a fallback result set.
