Select to view content in your preferred language

Trying to convert Arcade script from AGOL to ArcGIS popup

452
3
Jump to solution
10-18-2023 01:59 PM
Labels (2)
BarryG
by
Occasional Contributor

I am trying to convert my Arcade script from an AGOL popup attribute to use in ArcGIS Pro popup configuration, to no avail:

"https://webaddress=pDetail&pKEY=(" + $feature["ASSESSED_G"] + ")"
0 Kudos
1 Solution

Accepted Solutions
BarryG
by
Occasional Contributor

Thank you Ken. This is what I have found worked in the Arcade popup option:

return { 
   type : 'text', 
   text : '<a href="https://keyweb.pittgov.net/WebPAAS/?DEST=pDetail&pKEY=' + $feature['ASSESSED_G'] + '">' + 'Property record: ' + $feature['ASSESSED_G'] + '</a>'
}

 

 

View solution in original post

0 Kudos
3 Replies
KenBuja
MVP Esteemed Contributor

The quotes are causing the problem

'https://webaddress=pDetail&pKEY=(' + $feature["ASSESSED_G"] + ')'
//or using template literals
`https://webaddress=pDetail&pKEY=(${$feature["ASSESSED_G"]})`
BarryG
by
Occasional Contributor

Thank you Ken. This is what I have found worked in the Arcade popup option:

return { 
   type : 'text', 
   text : '<a href="https://keyweb.pittgov.net/WebPAAS/?DEST=pDetail&pKEY=' + $feature['ASSESSED_G'] + '">' + 'Property record: ' + $feature['ASSESSED_G'] + '</a>'
}

 

 

0 Kudos
KenBuja
MVP Esteemed Contributor

You need to add the html tags to make it clickable. Note that you still have the quotes clashing. Since you have to put the URL in yet another set of quotes, it's easier to use template literals and the back tick.

 

return { 
  type : 'text', 
  text : `<a href="https://keyweb.pittgov.net/WebPAAS/?DEST=pDetail&pKEY=(${$feature['ASSESSED_G']})">${$feature['ASSESSED_G']}</a>`
}

 

0 Kudos