john.fivekiller

Template Content with colons

Discussion created by john.fivekiller on May 23, 2013
Hi (First time posting)

I am using javascript API 3.2

I want to use this (https://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Projected_Population_Change/MapServer/1) map layers on our application  and I want to display the data in a popup window using some custom HTML formatting, but I am running into an issue with colons in the field names.

Template Content String

'<b>2012-2017 Population: Annual Growth Rate</b>${2012-2017 Population: Annual Growth Rate (Esri):NumberFormat}</br>'

But its keeps trowing a exception about "SyntaxError {}"  I believe the issue is the field name has a colon ':' in it and it's trying to parse " Annual Growth Rate (Esri):NumberFormat" as a formatter or something.

Is their an escape character? Or work around?

Thanks in advance.

Outcomes