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

Using not equal with multiple string values? 1

Status
Not open for further replies.

towntopic

Technical User
May 15, 2003
103
US
In my selection formula, I need to make sure that any value where and Item Vendor's ID is equal to 92054, 96002, or 52705 are not read into the report. So I currently have:

{Item.Vendor_ID} <> "92054"
And
{Item.Vendor_ID} <> "96002"
And
{Item.Vendor_ID} <> "52705"

in the selection formula. Is there an single line statement to do this exact thing?

{Item.Vendor_ID} <> ("92054","96002","52705") ??????

I just can't seem to find anything on this. Thanks in advance.
 
If I understand the Instr function correctly (which could be assuming a lot!) you can only have one string value that you are comparing to another string. In my case, I have three strings that I need to see if the exist within a specific field.

For instance:

Instr({ITEM.Vendor_Id},"92054","96002","52705") > 0

will give you an error that too many arguments have been given.
 
not ({Item.Vendor_ID} in ["92054","96002","52705"])

-dave
 
nicely done vidru! i like clean code and this cleans it up. boogie on...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top