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

Using the in operator-URGENT

Status
Not open for further replies.

enuthalapaty

Programmer
Dec 20, 2000
6
US
How do I use the in operator I have a parameter field with the values separated by commas.Do I have to put this in an array and then use in or how else .Please let me know....
 
yes it's like an array use ["x","y","z"]
the following is from Seagate.. hOpe it helps

The following example is applicable to both Basic and Crystal syntax:
Rem Basic syntax
{customer.REGION} In Array ("CA", "HI", "AK")
//Crystal syntax
{customer.REGION} in ["CA", "HI", "AK"]
Is the value of the {customer.REGION} field in the array of state abbreviations?
The following examples are applicable to Crystal syntax:
{file.COLOR} in ["Red", "White", "Blue"]
Is the value of the {file.COLOR} field in the array of colors listed in the brackets?

 
I tried using that but I keep getting an error saying Array undefined.All my values are in a parameter like for example
area="red","green","yellow"
and then in crystal all I use is
tblarea.areaname in [{?area}]
And I keep getting an error.Please help as this is very Urgent
 
First of all, you have to define your array. If you are using Basic syntax, and your parameter is named area
formula = {tblarea.areaname} in {?area}

Does your parameter prompt you for multiple values when you use it? The Allow Multiple Values check box should be selected for it to be considered an array. Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
Ignore that first sentence above - I was talking on the phone and that does not apply... Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top