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.
aduyvesteyn_0-1693262845534.png
Figure 1. Attribute table example
aduyvesteyn_1-1693262995116.png
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, "-")
JohannesLindner_0-1693293991369.png
JohannesLindner_1-1693294034955.png
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, "-")
JohannesLindner_0-1693293991369.png
JohannesLindner_1-1693294034955.png