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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Request - Assisance with Multiple Wild Card Selection Formula 1

Status
Not open for further replies.

0sprey

Technical User
May 9, 2015
81
CA
I am working on a formula to select data based on a text filed is the following conditions are true :

GAMMA\abc123 or GAMMA\abc1234

Where: “GAMMA\” is a constant
“abc” represents a group of three characters that can vary
“123” and “1234” represnt a grouping of numbers that can vary


I have tried using the IN and LIKE functions as follows and in several variations

({Table.name} LIKE “*GAMMA\???###*”) OR ({Table.name} LIKE “*GAMMA\???####*”)

({Table.name} IN [“*GAMMA\???###*”]) OR ({Table.name} IN [“*GAMMA\???####*”)]

Only {Table.name} LIKE “*GAMMA*” returns any data… but of course too much.

{Table.name} LIKE “*GAMMA\*” returns no data at all.

All help on this issue very welcome.
 
The problem is the use of the backslash, which probably is a reserved character. The # sign can be used for formatting, but does not work here, from what I can tell. Create a formula {@replace} like this:

replace({table.field},"\","-")

...and then change your selection formula to:

{@replace} like "*GAMMA-???*"

The original field with backslash will be appear in the report--you don't have to replace it for purposes of display.

-LB
 
Excellent... worked exactly as you described !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top