# Flex Repeater instances binding to query

**URL:** <https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461>\
**Category:** Ignition\
**Tags:** perspective, ignition81, database\
**Created:** [October 20, 2022, 2:49pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461 "2022-10-20T14:49:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![stra](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stra/32/23678_2.png) [@stra](https://forum.inductiveautomation.com/u/stra)\
**Post date:** [October 20, 2022, 2:49pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461/1 "2022-10-20T14:49:08Z")

</div>

It is not clear to me how to bind a table from DB query to the instances:

exist some examples?

---

<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:** [October 20, 2022, 3:31pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461/2 "2022-10-20T15:31:52Z")

</div>

What are you trying to do? Post a drawing or diagram if it helps.

---

<div class="post-metadata">

**Author:** ![stra](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stra/32/23678_2.png) [@stra](https://forum.inductiveautomation.com/u/stra)\
**Post date:** [October 20, 2022, 3:39pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461/3 "2022-10-20T15:39:39Z")

</div>

I try to be more clear:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/6/c6a6a1ce78e0fdccf4cfbc0e9e33546c9532d948.png)  
this simple sample has a "view" with a parameter "label" and I want to repeat based on a query. How to do?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [October 20, 2022, 4:30pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461/4 "2022-10-20T16:30:22Z")

</div>

Setup a Named Query to return all of the "labels" you want. Make sure the returned content from your query contains a column which has a name of "label".

Bind `instances` against this named query. I recommend also changing the return format from `auto` to `json` for readability reasons (I try to avoid datasets just because I get no immediate insight into their content).

Note here that I have renamed the column being returned to `label`:

 ![Screen Shot 2022-10-20 at 9.29.28 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/a/9a2f983882caa2749ab13fe7f6d4d90f89cc62b6.png)

This is the result:  
 ![Screen Shot 2022-10-20 at 9.29.20 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/8/389851844211436784e3812fd133b075f3a041ed.png)

---

<div class="post-metadata">

**Author:** ![stra](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/stra/32/23678_2.png) [@stra](https://forum.inductiveautomation.com/u/stra)\
**Post date:** [October 20, 2022, 4:32pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461/5 "2022-10-20T16:32:14Z")

</div>

great

---

<div class="post-metadata">

**Author:** ![Joe\_Lavalliere](https://avatars.discourse-cdn.com/v4/letter/j/c2a13f/32.png) [@Joe\_Lavalliere](https://forum.inductiveautomation.com/u/Joe_Lavalliere)\
**Post date:** [April 13, 2023, 2:05pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461/6 "2023-04-13T14:05:25Z")

</div>

Hello,

Is it possible to not only bind the instances to a Named query, but also place an expression binding on the parameter name imported from the query?

---

<div class="post-metadata">

**Author:** ![cmallonee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmallonee/32/6416_2.png) [@cmallonee](https://forum.inductiveautomation.com/u/cmallonee)\
**Post date:** [April 13, 2023, 4:04pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461/7 "2023-04-13T16:04:41Z")

</div>

I'm not quite sure I understand your question. Named Queries do allow for supplying parameters to the query. To do so, select your Named Query in the Project Browser, and in the Authoring tab add a parameter (and then use that parameter within the query). Save your chnages, and then use that Named Query in your binding. There will be an input field which allows for specifying the parameter of the Named Query as an expression.

This [post](https://forum.inductiveautomation.com/t/database-parameter-type-not-showing-up-named-query/45339/2) in a different thread should give you a better visual, though note that the post is parameterizing the database instead of a value of the query.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [April 13, 2023, 4:59pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-instances-binding-to-query/65461/8 "2023-04-13T16:59:35Z")

</div>

If you mean generate properties that have bindings, no, you can't.  
You'll need to compute everything where you generate the instances.
