Select to view content in your preferred language

Arcade Find Length of Text String

6679
2
Jump to solution
07-20-2022 08:18 AM
Labels (1)
KellyPhipps
Occasional Contributor

Using ArcGIS Pro 2.9, I'm having trouble finding a way to use Arcade to determine the length of text within a field.  For example, I'd like to evaluate a field for if the length of the string is greater than 3 then leave the label blank, otherwise display the Label field...iif(Length($feature.Field) > 3, "", $feature.Label).

The Length function in Arcade is for displaying the length of geometry.  Is anyone aware of an Arcade function that can be used to determine the length of a text string?

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

The Count function returns the number of characters in a string.

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

The Count function returns the number of characters in a string.

KellyPhipps
Occasional Contributor

Thanks so much @KenBuja 

0 Kudos