Filtering Columnar Data

Mark Schonewille m.schonewille at
Mon Jul 16 15:55:50 EDT 2007

Here's another solution...

function quickSortAndFilter theData,theItemNr,theFilter
   set the itemDel to tab
   sort theData by (item theItemNr of theData is not theFilter)
   repeat for each line myLine in theData
     if item theItemNr of myLine is theFilter then
       put myLine & cr after myNewData
     end if
   end repeat
   return myNewData
end quickSortAndFilter

Best regards,

Mark Schonewille


Economy-x-Talk Consulting and Software Engineering

Quickly extract data from your HyperCard stacks with DIFfersifier.

Op 16-jul-2007, om 17:58 heeft Gregory Lypny het volgende geschreven:

> Hello Everyone,
> I'm struggling with the filter command.  I have tab-delimited data  
> in a field, where each row has at least 56 columns.  I want to  
> filter the data based on a chosen number in that fourth column, for  
> example, to return all lines that have a 9 there.  The fourth  
> column only contains a number from 1 to 10.  The following handler  
> works most of the time.  I put three wild card expressions, lone  
> asterisks separated by tabs, to make sure nothing is being picked  
> up in the first three columns.  The tab and asterisk (and it could  
> be just an *) following myNumber says that it doesn't matter what  
> is in the columns after the fourth.

More information about the Use-livecode mailing list