Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Array Intersections
I am looking for a suggestion here.
I have large arrays which are being displayed from an index table (my index, not an OI index) and some have 600,000 lines.
This reads the item and displays the table in around 3-5 seconds which is impressive.
There are generally about 3-8 columns, column 1 is a factor and column 2-8 is a code.
I am looking to introduce a filter option to allow a column to be selected and a filter applied, and then I want to quickly reduce the table to the lines which are applicable to the filters. Screen below although for testing I have only added 3 filters.
I checked out the SRP array function and cant see any toolset there for this.
At present I have tried a loop setting the row visible property, but am OK with generating a reduced table for display.
Any suggestions as how best to deal with this through any SRP tools.
I can improve my loop to use the reduce function in OI, but thought first I would consult SRP to see if there are any existing concepts I can use.
If not then I will look to make this a bit clever internally using my own code.
Thanks
I have large arrays which are being displayed from an index table (my index, not an OI index) and some have 600,000 lines.
This reads the item and displays the table in around 3-5 seconds which is impressive.
There are generally about 3-8 columns, column 1 is a factor and column 2-8 is a code.
I am looking to introduce a filter option to allow a column to be selected and a filter applied, and then I want to quickly reduce the table to the lines which are applicable to the filters. Screen below although for testing I have only added 3 filters.
I checked out the SRP array function and cant see any toolset there for this.
At present I have tried a loop setting the row visible property, but am OK with generating a reduced table for display.
Any suggestions as how best to deal with this through any SRP tools.
I can improve my loop to use the reduce function in OI, but thought first I would consult SRP to see if there are any existing concepts I can use.
If not then I will look to make this a bit clever internally using my own code.
Thanks
Comments
HTH, M@
Personally I've used the loop approach but I reckon I could break for lunch while it was happening if I was dealing with 600,000 items.
I will give it a go here and report back.
Thanks for the input.
When when the user changes the filter option, you get the data directly from the index. The indexes would just be global variables in your code. If a user applies two filters at the same time, then you could get the intersection of the two indexes relating to those two filters.