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

How do you select the first occurrance/entry in an array field?

Status
Not open for further replies.

rji1124

Technical User
Nov 15, 2001
67
US
Hi.. we are on CR 9.2... running reports from Peregrine Service Center DB...

We have an array field called assignment history in Service Center - this field keeps track of all the department names a ticket has been assigned to...

We want to extract the first element in this array and put it on a report..

Tried researching some in the resources we have, but the best we can do is pull the first letter off using a formula: [{probsummarym1.assignment.history}][1]

Any help would be greatly appreciated...
 
How is the array delimited, or is it?

Crystal doesn't recognize any array types that I'm aware of, so you need to describe what Crystal considers the field type, and show example contents.

If it's delimited by a character, such as a pipe symbol (|), try:

split({table.field},"|")[1]

the "|" would change depending upon what you have as the delimiter.

-k
 
Thanks.. this is what I need I believe... next hurdle is to figure out what exactly the delimiter is... looking at the field through Crystal, there are two very bold bars (||) between elements - perhaps a carrriage return...
 
Those are probably pipes, try my formula using both.

split({table.field},"||")[1]

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top