Link to home
Start Free TrialLog in
Avatar of JMO9966
JMO9966

asked on

How to split a Text field using a delimiter and gather values

I've done this easily with VB.Net but struggling here.

I have a report field on this Crystal Report that is a Text field.

This text field will hold two values seperated by a comma.  In certain cases, this field may be null or not have a comma also.

I need to gather the value prior to the comma with a Crystal Formula if a comma exists in the text field.

Here's my attempt:

Local StringVar result;
Local StringVar Array resultArray;
resultArray = Split ({MC_PurchaseOrder_TTX.Note_Text}, ",");
result := resultArray(1)

Thanks for the assistance.
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JMO9966
JMO9966

ASKER

Thanks Peter, that worked great!

JMO9966