So I have this VBScript in labeling that I'm trying to convert to Arcade, and it's the "(" and the ")" that I'm having issues in writing into the Arcade expression.
VBScribt expression: [GL_STR_FUL] & VBNEWLINE & "( " & [ALIAS_NAM] & " )"
Also.... is there an easy way to convert all VBScript into Arcade instead of going one my own in the expressions or a useful link to writing Arcade expressions since I'm pretty new at writing script in general....?
Thank you for your help!
Solved! Go to Solution.
I don't know that you'll find a reliable "conversion" tool, but Arcade's pretty simple.
To access feature attributes in Arcade, use the notation $feature.attribute or $feature['attribute'].
Concatenating text can be done with a "+" instead of "&". Or you can use a backtick string to pipe things into the text.
Basic concatenation:
$feature['GL_STR_FUL'] + TextFormatting.NewLine + '(' + $feature['ALIAS_NAM'] + ')
Backtick string:
`${$feature['GL_STR_FUL']}
(${feature['ALIAS_NAM']})`
I don't know that you'll find a reliable "conversion" tool, but Arcade's pretty simple.
To access feature attributes in Arcade, use the notation $feature.attribute or $feature['attribute'].
Concatenating text can be done with a "+" instead of "&". Or you can use a backtick string to pipe things into the text.
Basic concatenation:
$feature['GL_STR_FUL'] + TextFormatting.NewLine + '(' + $feature['ALIAS_NAM'] + ')
Backtick string:
`${$feature['GL_STR_FUL']}
(${feature['ALIAS_NAM']})`
PS - https://github.com/Esri/arcade-expressions
You can find all kinds of Arcade expressions there, along with helpful explanations.
Thank you so much! This is very helpful and that's what I was missing the & to the +... no wonder it didn't work right.