-----Original Message-----
From: Mike Byerley
Sent: Friday, July 27, 2012 2:38 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Fw: Universal Search Form
don't forget "contains" and "soundex"
----- Original Message -----
From: "MDRD" <[email protected]>
To: "RBASE-L Mailing List" <[email protected]>
Sent: Friday, July 27, 2012 2:08 PM
Subject: [RBASE-L] - Fw: Universal Search Form
Sorry if this is a double post, I am having email problems...
I am trying to improve a search form I made over 10 years ago to help users
search for customers using several different columns. Users kept asking how
do I find a customer when we can’t remember their name or account number but
remember they worked at ABC company, was a male and lived in XYZ town.
So I created a form with several Var Edit fields, Firstname, Lastname,
HmPhone, WkPhone and so on. I even had columns for Balance, and
LastTransaction. With these 2 fields they could choose < > =. The user
would fill out 2 or 3 of the fields then click a button that would run an
EEP like below.
Not real slick but it seems to work OK.
I am sure this could be improved on and would love to have any suggestions.
Thanks
Marc
IF vfirst IS NOT NULL THEN
SET VAR vfirst = (' and f_name like '''+ ( .vfirst)+'%'+'''')
ENDIF
IF vlast IS NOT NULL THEN
SET VAR vlast = (' and L_name like '''+ ( .vlast)+'%'+'''')
ENDIF
IF vhmphone IS NOT NULL THEN
SET VAR vhmphone = (' and hm_phone contains '''+ ( .vhmphone)+ +
'''')
ENDIF
IF vwkphone IS NOT NULL THEN
SET VAR vwkphone = (' and wk_phone contains '''+ ( .vwkphone)+ +
'''')
ENDIF
-- we have an IF ENDIF statement each field
SET VAR vwhere = +
('custnum exists ' + .vfirst + .vlast + .vhmphone + .vwkphone ...........
BROWSE custnum=NOSCROLL=READ=7 AS patnum,f_name=NOSCROLL=11 +
AS firstname,l_name=NOSCROLL=11 AS lastname, ........
FROM ptinfo +
WHERE &vwhere OPTION LOCK 3
--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]
(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body,
place any
text to search for.
================================================