# Flex repeater on query binding not working properly

**URL:** <https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582>\
**Category:** Ignition\
**Created:** [September 12, 2025, 3:20pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582 "2025-09-12T15:20:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francesco\_Vittadini](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@Francesco\_Vittadini](https://forum.inductiveautomation.com/u/Francesco_Vittadini)\
**Post date:** [September 12, 2025, 3:20pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/1 "2025-09-12T15:20:29Z")

</div>

Hello

I’m going crazy on a flex repeater populated with query binding

this is the query:

```python
select
	l.sap_code,
	w.nome,
	w.description,
	l.validated_on "valid" ,
	w.qty ,
	w.pos
from
	wl_warehouse_log l
inner join wm_warehouse_masterdata w on
	w.sap_code = l.sap_code
where
	l.created_on::date = :data

```

this is the repeater

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/262b1ab4b7794ac103d972f005f7ad6feb3f8b36.png)

as you can see the column valid is reflected in the repeater and moreover is also used as a condition in another field which is working properly

When the flex repeater is filled the column valid is correctly populated "(column VALIDATO) but in the instances there is no trace of “valid”. See below

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/0/702930e22112876ba4ebe3e80a6499805713bc89.jpeg)

so as soon as I run a script on the flex repeater the attribute valid is not found

I’m running a change script on the flex repeater which is the following one:

```python
insta = self.props.instances
cond = True
for ix in insta:
	if ix.valid:
		cond = False
	else:
		cond = True
self.view.custom.valid = cond

```

This is the error

```python
Error running property change script on FlexRepeater.props.instances: Traceback (most recent call last): File "<function:valueChanged>", line 5, in valueChanged AttributeError: 'com.inductiveautomation.perspective.gateway.script' object has no attribute 'valid'

```

Can someone please tell me where I’m wrong?

Thanks

---

<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:** [September 12, 2025, 3:26pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/2 "2025-09-12T15:26:20Z")

</div>

> [@Francesco\_Vittadini](#):
>
> `	if ix.valid:`

Your instances don't have a `valid` property.

EDIT:  
Because  
`	l.validated_on "valid" ,`  
is not valid SQL syntax. Try:  
`	l.validated_on as "valid" ,`

---

<div class="post-metadata">

**Author:** ![Francesco\_Vittadini](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@Francesco\_Vittadini](https://forum.inductiveautomation.com/u/Francesco_Vittadini)\
**Post date:** [September 12, 2025, 3:27pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/3 "2025-09-12T15:27:10Z")

</div>

Adding that as soon as I change the query in the binding ,for example adding new column .. the column are correctly shown until I run the page in demo mode

---

<div class="post-metadata">

**Author:** ![Francesco\_Vittadini](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@Francesco\_Vittadini](https://forum.inductiveautomation.com/u/Francesco_Vittadini)\
**Post date:** [September 12, 2025, 3:28pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/4 "2025-09-12T15:28:39Z")

</div>

Hello Paul

tried but nope

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/9/9921c25094829cb2ac7ad95d430d37bdc2412237.jpeg)

I’ve also added column row\_id which is also not appearing

---

<div class="post-metadata">

**Author:** ![Francesco\_Vittadini](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@Francesco\_Vittadini](https://forum.inductiveautomation.com/u/Francesco_Vittadini)\
**Post date:** [September 12, 2025, 3:29pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/5 "2025-09-12T15:29:22Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/17e82fae4146fcdc1e3247b9dc3f783099e7355f.png)

query result in editor

---

<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:** [September 12, 2025, 3:30pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/6 "2025-09-12T15:30:11Z")

</div>

Show a screenshot of your binding configuration on the flex repeater.

---

<div class="post-metadata">

**Author:** ![Francesco\_Vittadini](https://avatars.discourse-cdn.com/v4/letter/f/9dc877/32.png) [@Francesco\_Vittadini](https://forum.inductiveautomation.com/u/Francesco_Vittadini)\
**Post date:** [September 12, 2025, 3:34pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/7 "2025-09-12T15:34:05Z")

</div>

> [@Francesco\_Vittadini](#):
>
> ```python
> insta = self.props.instances
> cond = True
> for ix in insta:
> if ix.valid:
> cond = False
> else:
> cond = True
> self.view.custom.valid = cond
> 
> ```

Solved … I deleted the flex repeater and did a new one ….

Some weird behaviour

Thanks

---

<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:** [September 12, 2025, 3:44pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/8 "2025-09-12T15:44:08Z")

</div>

Are you sure that's what you want to do ?  
This code snippet will only reflect the `valid` field of the LAST `ix` in `insta`.  
Which could be written like this:

```python
self.view.custom.valid = not self.props.instances[-1].valid

```

---

<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:** [September 12, 2025, 3:50pm UTC](https://forum.inductiveautomation.com/t/flex-repeater-on-query-binding-not-working-properly/110582/9 "2025-09-12T15:50:16Z")

</div>

Assuming your goal was to set `self.view.custom.valid` to `True` only if **all** of the instances are invalid, you can use the `all()` built-in function.

```python
self.view.custom.valid = all(not ix.valid for ix in self.props.instances)

```

Or, if your goal was different (thanks Gemini):

- Check if ALL instances are valid:

- Check if ANY instance is valid:

- Check if ANY instance is invalid:
