# How to filter out values of a certain range in a table via Dropdown?

**URL:** <https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 16, 2024, 7:50pm UTC](https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033 "2024-09-16T19:50:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Huang](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Bill\_Huang](https://forum.inductiveautomation.com/u/Bill_Huang)\
**Post date:** [September 16, 2024, 7:50pm UTC](https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033/1 "2024-09-16T19:50:22Z")

</div>

Hi everyone, I'm trying to use dropdown component in Perspective to filter out the rows of a power table with expected value.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/8/c87764a6dea90bab605458e1794b72a2163995a0.png)  
I realized the "value" of each objects can be a number, while it's is possible to set it as a range? Like 90 to 95? So when it's selected, all rows with number what between 90 to 95 would be sort out.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 16, 2024, 7:54pm UTC](https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033/2 "2024-09-16T19:54:42Z")

</div>

The easiest way is to create your column data and enabled filtering on the column.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/17b618853af6bbf0ab4d09dfadcb2b962391bd2c.png)

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

EDIT: this method works well for user based filtering. If the filter should be scripted, you'll probably have to loop over the dataset and create a new dataset based on your filter range. This works well with the [Integration Toolkit](https://www.automation-pros.com/toolkit/doc/scripting.html) module which can iterate in an expression binding, and it's free.  
[Automation Professionals' Integration Toolkit Module - 3rd Party Modules - Inductive Automation Forum](https://forum.inductiveautomation.com/t/automation-professionals-integration-toolkit-module/74934)

---

<div class="post-metadata">

**Author:** ![Bill\_Huang](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Bill\_Huang](https://forum.inductiveautomation.com/u/Bill_Huang)\
**Post date:** [September 16, 2024, 9:36pm UTC](https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033/3 "2024-09-16T21:36:12Z")

</div>

Thank you for the reply!  
I have created the columns data under the property of the power table then activated filter but it wouldn't give me the option for "between". Is there anything else I need to turn on? I am going to use this filter for the last column that contains 90's only.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/7/579800cda6b9d55e8d46c0648f8092111923d605.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:** [September 16, 2024, 9:47pm UTC](https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033/4 "2024-09-16T21:47:33Z")

</div>

Try setting,  
`columns.4.render : number`

It should then use all the conditions in the  
`columns.4.render.number.condition`  
dropdown instead of all those in the  
`columns.4.render.string.condition`  
dropdown.

---

<div class="post-metadata">

**Author:** ![Bill\_Huang](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Bill\_Huang](https://forum.inductiveautomation.com/u/Bill_Huang)\
**Post date:** [September 21, 2024, 12:32am UTC](https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033/6 "2024-09-21T00:32:50Z")

</div>

Realized that the data type of the column was string instead of number. The problem was the query. It works after modified. Thanks for the idea anyway!

---

<div class="post-metadata">

**Author:** ![Bill\_Huang](https://avatars.discourse-cdn.com/v4/letter/b/b4bc9f/32.png) [@Bill\_Huang](https://forum.inductiveautomation.com/u/Bill_Huang)\
**Post date:** [September 21, 2024, 12:44am UTC](https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033/7 "2024-09-21T00:44:14Z")

</div>

Thank you for the solution! It works just fine for my project.  
Also thanks for sharing the info of the Module. I was going to bind a script to achieve this target, but I'm lack of experience of using it. Is there any resource and examples I can find online?

---

<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 21, 2024, 8:48am UTC](https://forum.inductiveautomation.com/t/how-to-filter-out-values-of-a-certain-range-in-a-table-via-dropdown/96033/8 "2024-09-21T08:48:33Z")

</div>

While the built-in filters are probably your best bet in this case, it's interesting to know that a dropdown's value can be more than just a single constant.  
It can be objects and arrays too:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/0/f01e10ad84f926803d391917cd17fd14afebf5a0.png) ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/e/1e78346d46ebd486b7b1b6c3c0756e7b5b02a59e.png)
