Skip to Content
0
Former Member
Feb 20, 2009 at 04:38 PM

Split function not working as expected

23 Views

I have a report in Crystal XI r2 where I'm trying to use the Split function in a formula field. I can't seem to get it to return anything though. The formula is below. In testing, I found that the Ubound function always returns 0 for records that have multiple delimited values in the {Contact.Participant_Hard_Skills__c} field,for example, a record where Participant_Hard_Skills__c = "Equipment Maintenance;Mathematics;Installation;Repairing;Troubleshooting". I've tried having it loop through the array just once as a test just in case it's the UBound function that's not working, but it never loops through at all, the array is always empty. Any ideas would be much appreciated.

Formula:

Local StringVar Array p_s:= Split({Contact.Participant_Hard_Skills__c}, ";");

Local NumberVar x = 0;

Local NumberVar i;

if UBound(p_s) > 0 then

for i := 1 to UBound(p_s) do

(

if InStr({Opportunity.Hard_Skills_Required__c}, p_s) > 0 then

x = x +1

);

x