# Configure Query Binding - Path

**URL:** <https://forum.inductiveautomation.com/t/configure-query-binding-path/84295>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [January 15, 2024, 9:55pm UTC](https://forum.inductiveautomation.com/t/configure-query-binding-path/84295 "2024-01-15T21:55:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Virgar\_Poulsen](https://avatars.discourse-cdn.com/v4/letter/v/ad7895/32.png) [@Virgar\_Poulsen](https://forum.inductiveautomation.com/u/Virgar_Poulsen)\
**Post date:** [January 15, 2024, 9:55pm UTC](https://forum.inductiveautomation.com/t/configure-query-binding-path/84295/1 "2024-01-15T21:55:12Z")

</div>

I have a chart opening on an embedded view, and I need to pass a view paramater to the Path of a Query. Is this just not possible ?

Regards  
V

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 15, 2024, 10:21pm UTC](https://forum.inductiveautomation.com/t/configure-query-binding-path/84295/2 "2024-01-15T22:21:44Z")

</div>

Sure it's possible.  
Post your code. See [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![Virgar\_Poulsen](https://avatars.discourse-cdn.com/v4/letter/v/ad7895/32.png) [@Virgar\_Poulsen](https://forum.inductiveautomation.com/u/Virgar_Poulsen)\
**Post date:** [January 15, 2024, 10:37pm UTC](https://forum.inductiveautomation.com/t/configure-query-binding-path/84295/3 "2024-01-15T22:37:01Z")

</div>

There is no code involved, just bindings.

How is it possible to achieve ?

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 15, 2024, 10:46pm UTC](https://forum.inductiveautomation.com/t/configure-query-binding-path/84295/4 "2024-01-15T22:46:02Z")

</div>

> [@Virgar\_Poulsen](#):
>
> I need to pass a view paramater to the **Path of a Query**.

What exactly do you mean by this?  
Usually we use named queries and pass in parameters by binding.

[https://docs.inductiveautomation.com/display/DOC81/Named+Query+Parameters](https://docs.inductiveautomation.com/display/DOC81/Named+Query+Parameters)

[https://docs.inductiveautomation.com/display/DOC81/Named+Query+Bindings](https://docs.inductiveautomation.com/display/DOC81/Named+Query+Bindings)

---

<div class="post-metadata">

**Author:** ![Virgar\_Poulsen](https://avatars.discourse-cdn.com/v4/letter/v/ad7895/32.png) [@Virgar\_Poulsen](https://forum.inductiveautomation.com/u/Virgar_Poulsen)\
**Post date:** [January 15, 2024, 11:06pm UTC](https://forum.inductiveautomation.com/t/configure-query-binding-path/84295/5 "2024-01-15T23:06:02Z")

</div>

I'm not using parameters for my query. I'm using view parameters for my embed view.

I need those params, to go to the binding of a query path. (. Path, not param )

If you click on binding for any property, you have the option to choose a binding type called "Query", in that binding type, there is a "Path".  
I can only hardcode this path. Why can I not bind it to another property (view paramater for example )

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [January 15, 2024, 11:14pm UTC](https://forum.inductiveautomation.com/t/configure-query-binding-path/84295/6 "2024-01-15T23:14:56Z")

</div>

Ah, OK, no, you can't do it that way but can do it by script.

The simplest way I can think of is,

- Create a property binding on the chart. Select the view parameter using the Browse Properties button.
- Add Transform → Script. Add code,

```auto
    return system.db.runNamedQuery(value)

```

(`value` gets passed from the original binding into the transform.)

[https://docs.inductiveautomation.com/display/DOC81/system.db.runNamedQuery](https://docs.inductiveautomation.com/display/DOC81/system.db.runNamedQuery)

---

<div class="post-metadata">

**Author:** ![Virgar\_Poulsen](https://avatars.discourse-cdn.com/v4/letter/v/ad7895/32.png) [@Virgar\_Poulsen](https://forum.inductiveautomation.com/u/Virgar_Poulsen)\
**Post date:** [January 15, 2024, 11:15pm UTC](https://forum.inductiveautomation.com/t/configure-query-binding-path/84295/7 "2024-01-15T23:15:53Z")

</div>

ah, Perfect.  
thanks
