Hello there I have seem to come into an issue regarding an arcade popup. Within the same field in an attribute table there is both a nine digit number that needs to be formatted like (000-000-000) and a string value that does not need to be formatted in that sequence. Is there any arcade expressions that I could use to help me solve this issue so the pop up does not appear like it does in figure 2.
Figure 1. Attribute table example
Figure 2. Pop up Formatting issues
Thank you and I appreciate your feedback.
Solved! Go to Solution.
var txt = $feature.TextField1
if(IsNaN(Number(txt))) { return txt }
var parts = [
Left(txt, 3),
Mid(txt, 3, 3),
Right(txt, 3)
]
return Concatenate(parts, "-")
var txt = $feature.TextField1
if(IsNaN(Number(txt))) { return txt }
var parts = [
Left(txt, 3),
Mid(txt, 3, 3),
Right(txt, 3)
]
return Concatenate(parts, "-")
Thank you so much!