Popup link with URL that includes parameter from attribute value?

4549
3
04-01-2014 07:16 AM
GarySinner
New Contributor III
Is it possible to configure a popup in a webmap to include a link that consists of a URL with a "replaceable" parameter that comes from an attribute value for the selected feature?  For example, given point features with an attribute named "UNIQUEID", how could I define a popup with a link that displays in the popup as "Details" with the underlying URL of something like:
http://www.mydomain.com/Reports/FacilityDetail.asp?facid=UNIQUEID

When the user clicks on the "Details" link in the popup, the "UNIQUEID" parameter in the URL would be replaced with the value of the selected feature's UNIQUEID attribute, e.g.,
http://www.mydomain.com/Reports/FacilityDetail.asp?facid=12516

And then the updated URL would be opened in a new page in the browser.

I'm an ArcGIS Online neophyte, and haven't been able to find any documentation that leads me to think this is possible "out-of-the-box".  If it's not possible out-of-the-box, can it be done in JavaScript and then the template get shared within the organization?  Do you know of any examples for similar functionality?

Thanks!

Gary
Tags (2)
0 Kudos
3 Replies
GarySinner
New Contributor III
After continuing to scour the web for clues, I found this gem from Bernie:
http://blogs.esri.com/esri/arcgis/2012/10/04/url-parameters-in-pop-ups/

It looks like it should do exactly what I'm after.  The world is good.  I went through the steps, testing with some public Esri maps and layers.  Unfortunately the link that I define in the custom popup doesn't appear to be working. I haven't been able to figure out what I'm doing wrong.  The attached doc describes the steps that I took to try to verify that the approach would work for me.  I'd appreciate any insights into what I'm doing wrong, any limitations to the approach or known issues that might be the problem, etc.

Thanks!

Gary
0 Kudos
GarySinner
New Contributor III
Finally figured out my mistake - I was using Internet Explorer 11.  Why, why, why?!  :mad:
Switched to Chrome, followed the exact same workflow, and everything worked great!  🙂
0 Kudos
SmittySmith
New Contributor

Gary,

I think the issue here was that you did not hit the "set" button before clicking on create link.

0 Kudos