Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SPLIT Array Formula

In my data I have a field that holds three pieces of info seperated by a comma.

Im using SPLIT to split them out and that works just fine.

In this example the piece of data that I'm pulling out could be one of four things. Part [3] of my array in the code below could return:

In the host city

Under 50km


Above 100km

I'm trying to have Crystal return either 'In the City' or 'Outside the city'. So if [3] = "In the city", then I want it to print "In the city". Otherwise I need the value to be "Outside the city".

Below is my chicken scratch formula that doesnt work, if someone could point out my failings and how to correct them I would be most appreciative.

Local stringvar x:= SPLIT ({TABLE.DATA}, ", ") [3]
If x = "In The Host City"
Then "In The City"
Else "Outside The City"



Try the following :

stringvar x:='This is my ciry';

if InStr(x,'This is my') = 1 then

"Inside city"

else "Outside City"



0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question