In addition ....
If you need to concatenate or define the vWhereClause string with
TEXT values, try the following technique:
Example:
-- Defining Global Search
-- Database: RRBYW16
-- Table: OrderSummary
-- Associated columns used in search criteria:
. RegistID
. SLastName
. SFirstName
. SCompany
. SCity
. SState
. SZipCode
. SCountryName
. SEMail
. BLastName
. BFirstName
. BCompany
. BCity
. BState
. BZipCode
. BCountryName
. BEMail
-- Search Keyword
SET VAR vKeyword TEXT = 'whatever'
-- Pre-define variables
SET VAR vQuotes = (CVAL('QUOTES'))
SET VAR vMany = (CVAL('MANY'))
SET VAR vSearchString TEXT = NULL
SET VAR vWhereClause TEXT = NULL
SET VAR vSearchString = (.vQuotes+.vMany+.vKeyword+.vMany+.vQuotes)
-- Define vWhereClause
SET VAR vWhereClause = +
('(CTXT(RegistID)) LIKE'&.vSearchString&'OR ' + +
'SLastName LIKE'&.vSearchString&'OR ' + +
'SFirstName LIKE'&.vSearchString&'OR ' + +
'SCompany LIKE'&.vSearchString&'OR ' + +
'SCity LIKE'&.vSearchString&'OR ' + +
'SState LIKE'&.vSearchString&'OR ' + +
'SCountryName LIKE'&.vSearchString&'OR ' + +
'SEMail LIKE'&.vSearchString&'OR ' + +
'BLastName LIKE'&.vSearchString&'OR ' + +
'BFirstName LIKE'&.vSearchString&'OR ' + +
'BCompany LIKE'&.vSearchString&'OR ' + +
'BCity LIKE'&.vSearchString&'OR ' + +
'BState LIKE'&.vSearchString&'OR ' + +
'BCountryName LIKE'&.vSearchString&'OR ' + +
'BEMail LIKE'&.vSearchString)
-- Refresh the Variable Lookup ListView WHERE Clause
PROPERTY ListViewCompID REFRESHLIST 'TRUE'
RETURN
Have fun!
Very Best R:egards,
Razzak.