# How to pass dynamic list of ids to name query params

**URL:** <https://forum.inductiveautomation.com/t/how-to-pass-dynamic-list-of-ids-to-name-query-params/53762>\
**Category:** Ignition\
**Created:** [December 4, 2021, 12:50pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-dynamic-list-of-ids-to-name-query-params/53762 "2021-12-04T12:50:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [December 4, 2021, 12:50pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-dynamic-list-of-ids-to-name-query-params/53762/1 "2021-12-04T12:50:10Z")

</div>

Hello,

Like as code below I'd like to delete dynamic number of Ids from a table by using name query and I'd like to pass the ids list as params but I can't figure it out how to pass a list to name query.

> DELETE FROM dependents  
> WHERE  
> employee\_id IN (100 , 101, 102);

---

<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:** [December 4, 2021, 2:42pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-dynamic-list-of-ids-to-name-query-params/53762/2 "2021-12-04T14:42:19Z")

</div>

You can’t do it in a named query. You need to dynamically construct a “Prep” query in a script (with the correct number of question marks) to do this with safe parameters.

---

<div class="post-metadata">

**Author:** ![mcgheeiv](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mcgheeiv](https://forum.inductiveautomation.com/u/mcgheeiv)\
**Post date:** [December 4, 2021, 9:36pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-dynamic-list-of-ids-to-name-query-params/53762/3 "2021-12-04T21:36:32Z")

</div>

I do it in SELECT named queries all the time, it might work for deletes too.

Define a QueryString, employee\_ids, of type String and adjust your where clause.

WHERE employee\_id IN ({employee\_ids})

---

<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:** [December 4, 2021, 9:41pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-dynamic-list-of-ids-to-name-query-params/53762/4 "2021-12-04T21:41:24Z")

</div>

That’s using a querystring, not a **safe** value parameter. Not the same thing at all.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [December 4, 2021, 11:28pm UTC](https://forum.inductiveautomation.com/t/how-to-pass-dynamic-list-of-ids-to-name-query-params/53762/5 "2021-12-04T23:28:24Z")

</div>

To be fair, the OP didn’t ask for a safe way, just if there was a way. 🙂
