I am trying to convert my Arcade script from an AGOL popup attribute to use in ArcGIS Pro popup configuration, to no avail:
Solved! Go to Solution.
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>'
}
The quotes are causing the problem
'https://webaddress=pDetail&pKEY=(' + $feature["ASSESSED_G"] + ')'
//or using template literals
`https://webaddress=pDetail&pKEY=(${$feature["ASSESSED_G"]})`
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>'
}
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>`
}