# How to filter transfrom with checkboxes

**URL:** <https://forum.inductiveautomation.com/t/how-to-filter-transfrom-with-checkboxes/90548>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 17, 2024, 7:26am UTC](https://forum.inductiveautomation.com/t/how-to-filter-transfrom-with-checkboxes/90548 "2024-05-17T07:26:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [May 17, 2024, 7:26am UTC](https://forum.inductiveautomation.com/t/how-to-filter-transfrom-with-checkboxes/90548/1 "2024-05-17T07:26:52Z")

</div>

How to aply this checkboxes as fitler transfrom with code

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/b/8bcbf5d8ef7561dc4411eafa37777a99b1246e69.png)

---

<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:** [May 17, 2024, 7:33am UTC](https://forum.inductiveautomation.com/t/how-to-filter-transfrom-with-checkboxes/90548/2 "2024-05-17T07:33:22Z")

</div>

It would probably help to explain to readers that you want to construct a WHERE ... IN (chk\_0, chk\_1, ...) list for a named query.

 ![Checkbox filter WHERE IN](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/c/bc1fd04058ac5b2fa5f8690b246d0474ae19640b.png)

_Image from [https://forum.inductiveautomation.com/t/large-dataset-filtering-from-custom-data/90478.](https://forum.inductiveautomation.com/t/large-dataset-filtering-from-custom-data/90478.)_

---

<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:** [May 17, 2024, 8:19am UTC](https://forum.inductiveautomation.com/t/how-to-filter-transfrom-with-checkboxes/90548/3 "2024-05-17T08:19:23Z")

</div>

Here's one way.

 ![WHERE IN construction](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/68da43674c48541275c95658f88909c3facbd359.png)

```python
def transform(self, value, quality, timestamp):
	selected = []
	for row in value:
		if row['select']:
			selected.append(row['Filter'])
	return '(' + ', '.join(selected) + ')'

```

Result: `(One, Four, Seven, Ten, Thirteen)`

You need to refresh this binding any time a selection is changed on the table.

Understand that this requires use of a QueryString in your named query and that has certain security risks.
