Search question
Mike Bonner
bonnmike at gmail.com
Mon Jan 30 14:48:21 EST 2012
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