AnsweredAssumed Answered

Returning Specific Portions of an Arcade Split Function

Question asked by Davidkrady_dep on Jul 27, 2020
Latest reply on Jul 27, 2020 by Davidkrady_dep

Hello! 

I am trying to split data using the Split function and pull out specific portions of the array. Once my data is split and I try to pull out a specific section, I receive an error stating "Execution Error:Runtime Error: Out of Bounds." 

 

The code below works and pulls out the first section of data. 

var txt = $feature["C1_BASIS"];
var arr = Split(txt, ";");
return arr[0]

However this block of code returns the out of bounds error when I try and pull out the next section of data. 

var txt = $feature["C1_BASIS"];
var arr = Split(txt, ";");
return arr[1]

How can I return the individual sections of my split? 

 

Thanks! 

Outcomes