# I am trying to create a query tag but need to pass it parameters

**URL:** <https://forum.inductiveautomation.com/t/i-am-trying-to-create-a-query-tag-but-need-to-pass-it-parameters/74166>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [May 25, 2023, 12:42pm UTC](https://forum.inductiveautomation.com/t/i-am-trying-to-create-a-query-tag-but-need-to-pass-it-parameters/74166 "2023-05-25T12:42:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![robert.crawford](https://avatars.discourse-cdn.com/v4/letter/r/5e9695/32.png) [@robert.crawford](https://forum.inductiveautomation.com/u/robert.crawford)\
**Post date:** [May 25, 2023, 12:42pm UTC](https://forum.inductiveautomation.com/t/i-am-trying-to-create-a-query-tag-but-need-to-pass-it-parameters/74166/1 "2023-05-25T12:42:31Z")

</div>

I have query tag created but need to pass the queried key as a parameter into the query.

---

<div class="post-metadata">

**Author:** ![kyler.kamyszek](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kyler.kamyszek](https://forum.inductiveautomation.com/u/kyler.kamyszek)\
**Post date:** [May 25, 2023, 2:41pm UTC](https://forum.inductiveautomation.com/t/i-am-trying-to-create-a-query-tag-but-need-to-pass-it-parameters/74166/2 "2023-05-25T14:41:32Z")

</div>

You can just use another tag as your parameter and do a query in your query tag like this:

```auto
SELECT *
FROM yourTable
WHERE yourID= {[.]AnotherTag}

```

Make sure to set your datatype to dataset if you need more that one row/column from the query.

---

<div class="post-metadata">

**Author:** ![Kfoldesi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kfoldesi/32/11327_2.png) [@Kfoldesi](https://forum.inductiveautomation.com/u/Kfoldesi)\
**Post date:** [May 25, 2023, 3:41pm UTC](https://forum.inductiveautomation.com/t/i-am-trying-to-create-a-query-tag-but-need-to-pass-it-parameters/74166/3 "2023-05-25T15:41:00Z")

</div>

Their are a few variations:

- Vision/Perspective
- where did you create the query?
- where are you calling the query from.?

Good news is it can be done.... 🙂
