indexing an array in Crystal Syntax

I would like to know the syntax on indexing an array in Crystal Syntax.  I am in the formula workshop, and am dealing with a database field that contains multiple values separated by semicolons.  Thanks
cpursley1979Asked:
Who is Participating?
 
wykabryanCommented:
split return a string.  The number only indicated the subscript that should be return to the report.  
0
 
wykabryanCommented:
What version of CR are you using?  When you say, "database field that contains multiple values separated by semicolons", are these contained within one column?
0
 
cpursley1979Author Commented:
I am using Crystal designer 11.  Yes this is 1 column I am referencing.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
wykabryanCommented:
Ok.. you want to do something like this then.

{yourcolumn} in Split({column},',')
0
 
cpursley1979Author Commented:
Yes, I was thinking this:
//StringVar array months = split(sValues, ";");
//months[12];

but I know it is incorrect
0
 
wykabryanCommented:
well, this appears to work after some rework

split(sValues,';')[12]
0
 
cpursley1979Author Commented:
How does this work?
0
 
wykabryanCommented:
split will parse out the column.  The [12] indicated which object in the array you want to use.
0
 
cpursley1979Author Commented:
does split return a String type or numeric?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.