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

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


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.

The easiest way is to create your column data and enabled filtering on the column.
image

image

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 module which can iterate in an expression binding, and it's free.
Automation Professionals' Integration Toolkit Module - 3rd Party Modules - Inductive Automation Forum

1 Like

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.

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.

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!

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?

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: