Forward and Reverse filtering a List field

Bob Sneidar bobs at
Mon Jun 21 15:35:22 EDT 2010

Use 2 variables, one to hold the original data, and one to filter and then display. Each time the filter needs to be updated, put theTableData1 into theTableData2, then filter theTableData2 and set the dgText of group myDataGrid to theTableData2. 


On Jun 18, 2010, at 1:42 PM, Mark Stuart wrote:

> Hi All,
> Platform: WinXP
> revStudio: 4.0
> I'm building an app that populates SQL Server data into a list field
> that is defined as a table.
> The table data delimiter is the tab char.
> All this works fine.
> I'd like to build a filter system for the table data.
> The list would be "filtered" by typing a value into any column filter
> field, which is placed above each column.
> So if there are 4 columns, then there are 4 filter fields, having the
> possibility of an accumulative filter.
> Typing into or editing a filter field will filter the list for each
> character typed. Including backspacing a character or deleting any
> existing character.
> I've already built a prototype for this, and when typing a filter, the
> script works OK.
> In the "on rawKeyDown" handler, I first put the table data into a local
> variable and filter on it. Then put the variable back into the field.
> These ideas I got from searching the archive list.
> Problem is when I backspace a filter field character (conceptually
> reverting the filter), the data is not there, as it has already been
> filtered and put back into the field. Resulting in an incorrect data
> set.
> Question: so how do I build a filter system that can filter "forward"
> (typing ahead) and filter in "reverse" (editing existing filter value or
> "filter revert")?
> Regards,
> Mark Stuart
> _______________________________________________
> use-revolution mailing list
> use-revolution at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list