A phone number can't be numeric, but text/string
"(123) 456-7890"
Hi Thomas,
You'll be able to achieve this by using Arcade in the pop up:
Help:
Text Functions | ArcGIS for Developers
Text Functions | ArcGIS for Developers
Text Functions | ArcGIS for Developers
Configure pop-ups—ArcGIS Online Help | ArcGIS
Carmel
You will have to use the Custom Attribute Display (as Carmel Connolly indicated), but the html content should be like this:
<a href="tel:5551234567">Call (555)123-4567</a>
... to make it clickable and to be able to make the call. You can use a single expression to make the display text and use the content of the field just after "tel:" is the field just contains the digits.
Oh cool!
Hi @XanderBakker ,
I have been trying to create an expression for this in Map Viewer Beta and I copied and pasted your example above but I keep getting this error: "Parse Error:Line 4: Unexpected token <"
Any thoughts or ideas?
Thanks, Bill~
Hi @BillHeigh ,
Can you share what data you have (data) and what you are trying? The example I posted should be changed in order to include the field with the phone number. It just represents what the resulting HTML should look like. Not sure if it will show up as a link in the Map Viewer Beta.
Hi @XanderBakker ,
Sure can, it is this:
<a href="tel:$feature["gs39039_DBO_gs_service_point__4"]">Call (555)123-4567</a>
Just to keep it simple I didn't do any additional formatting. I did play around with the quotes as I thought they may conflict with my field name, but I kept getting the same error when I tested it.
Cheers, Bill~
Oh now I see what you want to do.
Field calculator in arcmap or Pro
add an integer field (long, short)
substitute 'a' for !YourFieldName! in line 3 below.
a = "(123) 456-7890"
int("".join([i for i in a if i.isdigit()]))
1234567890