Jump to content

Filter rows using IronPython


Pei Hsuan Shen 2

Recommended Posts

I just want to filter the values, like ['size'] = 'X' (code in SQL) in a table. How to execute the filter The method you suggest has to set Document.FilteringSchemes, but I don't know how to set the FilteringSchemes. (I need to filter the table I want by some rule in a loop, but I don't know how to write it.)

 

I have used [cursor = table.Select(" = 'L'")]. However, I don't know how to make the table return the selected rows I want.

Link to comment
Share on other sites

By default, you always have one filtering scheme with name "Filtering scheme" on basis of which filtering happens when you update any filter. 

 

annotation_2020-03-20_182130.png

 

If you have not changed anything, you can use that part in the code as it is. Now you only need to change the column name in that code with the column you have, and also change the array value with the values you want to pass. Make sure to have the filter-type as List Box otherwise modify the code according to the filter type you are using.

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...