I was hoping to use FindIndex as a stepping stone to implementing multi-column filtering functionality for my Data Grid.
I was hoping to filter the contents of a single column of my Data Grid like so:
Code: Select all
dispatch "FindIndex" to group "DataGrid 1" with "Col 2", "Mi*"
put the result into tIndexes
repeat for each item tIndex in tIndexes
answer info tIndex -- for testing only, will contain code to update the display of the Data Grid based on an array of matching indexes
end repeat
Two problems arise:
1. FindIndex appears only to look for a single (perhaps first) match,
2. Wild cards like * do not seem to work. "Mi*" results in index 0 (no match), whereas "Mitchell" results in index 4 (Line 4, Column 2 of the DataGrid contains the name Mitchell).
I do know how to filter the grid (based on the content of all columns) using:
Code: Select all
put the dgText of grp "DataGrid 1" into tText
put fld "fldFilterFirstName" into tFilter
filter tText with ("*" & tFilter & "*")
set the dgText of grp "DataGrid 1" to tText
Code: Select all
dispatch "FindIndex" to group "DataGrid 1" with "Col 2", "Mitchell", "Col 3", "Melbourne"
Building multi-column filtering is important to me, as I am analysing large datasets (1 million +) records with my DataGrids.
Perhaps I have the wrong approach to the multi-column filter challenge?
Any assistance greatly appreciated.
Kind regards, Andrew
PS: calling/channeling Trevor Devore?