I have a python script to remove the text in parentheses for labeling, and I cannot figure out how to convert it to work with Arcade. (I did not write this script, but I am trying to get the same results in AGOL.
The Python script is: def FindLabel ( [label] 😞
S =[label].strip()
i = S.find('(')
if i == -1:
return S.replace('::','\n')
elif i > 0:
return S[0:i]
I know that Arcade does not have a strip function, so I was trying trim, and instead of the newline function, I was just typing a space.
Example: '82 (Globe)' needs to be '82'
Thank you in advance.
Joan