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

Crystal-How To Write "In List" Formula

Status
Not open for further replies.

twkyoscr

Technical User
Joined
Aug 29, 2001
Messages
22
Location
US
Looking for simple way to do the following:

@Category =
if jobcode = 1063, 1009 1008 etc (about 18 job codes) then "Certified Nursing Tech"

I would like to avoid writing separte if then statements and just do if in list then else. Thanks!
 
Try this:
Code:
@Category =
if jobcode in [1063, 1009, 1008, ...] then "Certified Nursing Tech"

-dave
 
Thanks for your response, that is just what I'm needing. I entered the following and I am getting an error message

if {A_CNT_01_STAFFINGMIX.JOBCODE} in ["001062","001009","001043",...]

The error message says that the ] bracket is missing and it places the cursor in the middle of the list of job codes. Any thoughts?
 
Never mind, I was missing a quote on a job code listed. THANKS AGAIN!
 
Try using single quotes instead of double quotes.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top