Select to view content in your preferred language

Arcade Split returns Null

377
1
Jump to solution
10-26-2023 01:14 PM
NK2
by
New Contributor

Hello,

Is there a way to split more than a word using Arcade expression?

I am trying to use string-slicing, however, the result is null.

I want to extract all strings from the Assessment Roll Field after Spring.

FYI I am using ArcGIS Pro Calculate Field function

 

slice.PNG 

 

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

You can split the phrase with the text "Spring " (with the space after). This also has a check if the string didn't contain the word "Spring "

var theArray = Split($feature.Asmt_Roll, "Spring ");
iif (Count(theArray) > 1, theArray[1], "NA");

 

View solution in original post

1 Reply
KenBuja
MVP Esteemed Contributor

You can split the phrase with the text "Spring " (with the space after). This also has a check if the string didn't contain the word "Spring "

var theArray = Split($feature.Asmt_Roll, "Spring ");
iif (Count(theArray) > 1, theArray[1], "NA");