Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

space holder in prompts?

Status
Not open for further replies.

Namh

IS-IT--Management
Mar 22, 2006
21
US
Hi,

I wanna use something like a space holder for a prompt textfield. For example, if the user beginns the string with an * I wanna use the operator "CONTAINS" if the user uses a * as a placeholder in his string I wanna use "STARTS WITH".

I tried it with a simple if function, but got only some strange errors.

IF (?Parameter? STARTS WITH '*')
THEN (Database.Table.Field CONTAINS ?Parameter?)
IF (?Parameter? CONTAINS '*')
THEN ((Database.Table.Field STARTS WITH '?Parameter?)
ELSE (Database.Table.Field = '?Parameter?)
END

any help would be appreciated,

Namh
 
Easy with a dropdown and he user wont have to worry about * placement.

Create a dropdown with the CONTAINS, STARTS WITH, ENDS WITH

filter:
(<param>='CONTAINS' AND <Field> LIKE '%<param2>%' ) OR (<param>='STARTS' AND <Field> LIKE '<param2>%') OR
(<param>='ENDS' AND <Field> LIKE '%<param2>')
 
thanks KingCrab,

problem is that I have strict guidelines... so I need the * place holder
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top