0

I am working on creating a Attribute Expression that would display HTML with quotes in the field. I tried putting double quotes for the inner quotes, but I keep getting "Parse Error: Unexpected String". Here is how I am writing out the expression which I know works with Python.

"<a href=tel:""PHONE NUMBER"">PHONE NUMBER</a>"

What it should produce:

<a href=tel:"PHONE NUMBER">PHONE NUMBER</a>

Does anyone know how to print out quotes within a text field using Attribute Expression?

enter image description here

3

You could try using single quotes for the entire string with double quotes in the middle:

'<a href="sample text">sample text</a>'
2

I ended up using the "TextFormatting.DoubleQuote" function in arcade in order to accomplish this.

var PhoneNumber = "915555555555"

"<a href=tel:" + TextFormatting.DoubleQuote + PhoneNumber + TextFormatting.DoubleQuote + ">" + PhoneNumber + "</a>"

Source: https://developers.arcgis.com/arcade/function-reference/constants/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.