Search question

Marty Knapp martyknapp at comcast.net
Mon Jan 30 20:02:32 EST 2012


Thanks to those who responded to this. I was doing something similar to 
Dan's idea, but wondered if there was a way to use lineOffset or 
something else. I'll take a look at all the suggestions and continue on. 
I wish I could wrap my brain around regex - it all looks like a cat 
walked across my keyboard to my poor mind!

Marty K
> oops. Change the merge line to this for partial matches
>
>     filter tmyList with (merge("*[[line 1 of tMerge]]*[[tab]]*[[line 2 of
> tMerge]]*[[tab]]*[[line 3 of tMerge]]*[[tab]]*[[line 4 of tMerge]]*"))
>
>
> On Mon, Jan 30, 2012 at 10:57 AM, Mike Bonner<bonnmike at gmail.com>  wrote:
>
>> Or with filter
>>
>> I setup a stack with a list field and 4 search fields, 1 search field for
>> each column, and added a search button.
>>
>> --Search button code
>> on mouseUp
>>     put field "mylist" into tMyList
>>     repeat with i = 1 to 4
>>        if field ("field"&  i) is empty then
>>           put "*" into line i of tMerge
>>        else
>>           put field ("field"&  i) into line i of tMerge
>>        end if
>>     end repeat
>>     filter tmyList with (merge("[[line 1 of tMerge]][[tab]][[line 2 of
>> tMerge]][[tab]][[line 3 of tMerge]][[tab]][[line 4 of tMerge]]"))
>>     put tMyList
>> end mouseUp
>>
>> Puts an asterisk for empty search fields puts the value for the fields
>> that should be matched against.




More information about the use-livecode mailing list