# \[Feature\] Property on Perspective Table to assign filter

**URL:** <https://forum.inductiveautomation.com/t/feature-property-on-perspective-table-to-assign-filter/24043>\
**Category:** Ignition Early Access\
**Created:** [April 11, 2019, 2:31pm UTC](https://forum.inductiveautomation.com/t/feature-property-on-perspective-table-to-assign-filter/24043 "2019-04-11T14:31:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [April 11, 2019, 2:31pm UTC](https://forum.inductiveautomation.com/t/feature-property-on-perspective-table-to-assign-filter/24043/1 "2019-04-11T14:31:26Z")

</div>

Came across a use case, and I think this could be a useful feature. I’m trying to create a table that would display part data, and I wanted to give the operator the ability to scan a barcode to pull up those records in the table relevant to the part.

I can make it work using a Named query binding with those values, but having the filter value as a property could make it a bit easier and more flexible for other applications.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [April 11, 2019, 2:43pm UTC](https://forum.inductiveautomation.com/t/feature-property-on-perspective-table-to-assign-filter/24043/2 "2019-04-11T14:43:00Z")

</div>

I might be misunderstanding what you’re saying.

You can pass parameters into a Named Query so you could filter results in the WHERE clause of the query. You can also call stored procedures by making query text “EXEC dbo.spQuery” (MSSQL syntax) and pass parameters into that if you want to have your query in a stored procedure.

I’d build you an example quickly but I seem to be having a SQL driver issue on my test system so it can’t connect to databases.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [April 11, 2019, 2:52pm UTC](https://forum.inductiveautomation.com/t/feature-property-on-perspective-table-to-assign-filter/24043/3 "2019-04-11T14:52:07Z")

</div>

The named query would be the alternate work around.

Ideally, I would like to have a property on the table though that I can bind a string/value to in order to filter the table. It already has a filter box that you can type an input into, but there isn’t a spot where we can write a value to that box based on a script.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [April 11, 2019, 2:55pm UTC](https://forum.inductiveautomation.com/t/feature-property-on-perspective-table-to-assign-filter/24043/4 "2019-04-11T14:55:21Z")

</div>

OH! I see what you’re saying. I also fixed my db connection issue. It wasn’t the driver. This is a new system and I hadn’t opened up TCP/IP on my db server yet (LOL).

I tried using that filter box in the 8.0 build and it just blew up. One of the devs posted that there was a known issue with that feature and they are working on it. It seems that filter box should be doing what you are looking for.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [April 11, 2019, 2:56pm UTC](https://forum.inductiveautomation.com/t/feature-property-on-perspective-table-to-assign-filter/24043/5 "2019-04-11T14:56:35Z")

</div>

Yeah, the issue occurs when there is null data in the table.

The filter box gets me half way there, but for example, if I wanted to be able to scan a barcode to set that filter, I can’t use that filter box and have to switch to named queries currently since that filter isn’t a property.

---

<div class="post-metadata">

**Author:** ![ynejati](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ynejati/32/6093_2.png) [@ynejati](https://forum.inductiveautomation.com/u/ynejati)\
**Post date:** [April 23, 2019, 5:40pm UTC](https://forum.inductiveautomation.com/t/feature-property-on-perspective-table-to-assign-filter/24043/6 "2019-04-23T17:40:39Z")

</div>

Hi,

This should all be fixed in the next nightly build. Filtering should no longer blow up with null values or special characters. Also, the shape of the filtering prop will be changed so that you can write back to the filter text, as well as obtain results. It will look like this:

```auto
filter: {
    enabled: boolean;
    text: string;
    results: {
        enabled: boolean;
        data: array;
    }
}

```

There will be quite a few bug fixes and added features. I will be posting all of these changes here [http://forum.inductiveautomation.com/t/feedback-new-perspective-table/](http://forum.inductiveautomation.com/t/feedback-new-perspective-table/) later today, or early tomorrow morning.

-Yousuf
