troubleshooting Question

How to count array size when using split function?

Avatar of Danny Reader
Danny ReaderFlag for United States of America asked on
Crystal Reports
4 Comments1 Solution2451 ViewsLast Modified:
I have a field (FullNameField) with various name formats:

Mr. John Smith
Mrs. Sally E. Jones
Rick Stevens
Pat Allen Williams

I can use the following formula to separate and identify the various parts of the name:

stringVar array x;
x := Split({FullnameField});
x[1]; //output first array element

I want to create new fields for Title, First Name, Middle Name, Last Name.  Is there a way to count the total number of array elements so it can be determined which field it should go in?
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros