Using URL parameters in pop-ups

URL parameters are a handy way to pass information from one web page to another. The ArcGIS Online map viewer takes the ID of the web map to open as a URL parameter, and ArcGIS Online web maps can make use of URL parameters to define things such as the basemap, layers, and extent.

In this example we’ll take a look at how to construct a string to pass information from a pop-up to another website using URL parameters from feature attributes. A custom pop-up display will be used to create the URL link to open the website using a unique attribute value.

The Map

In this example we’re working with a parcel layer in a map. The pop-up for the parcel layer is shown below, note that the field APN contains the unique identifier for each parcel.

The Website

The county assessor’s website delivers detailed information for each parcel via the Property Information Management System (PIMS). The information can be retrieved by searching on the owner name, APN, or map book number. Below we’ve gotten the results for one of the parcels by entering the owner’s name.

Taking a closer look at the URL, we can see that the unique identifier (the APN) for each parcel is included as a parameter in the URL, appearing at the end after ?parcel=

The Mission

We’d like to display the parcel information from the PIMS website from a link in the layer pop-up, retrieving the specific information for the parcel that was clicked. Currently there is no direct link in our pop-up to access the Assessor’s PIMS website, but we do have the unique parcel identifier (in the APN field) for each parcel.

The Challenge

At the PIMS website we’ve learned that the URL takes the unique identifier (APN) as a parameter to retrieve information for any given parcel. Our challenge is to construct a link that passes the contents of the APN field as a URL parameter to the PIMS website, so we can open the parcel’s information from the feature pop-up.

The How

One way to accomplish our goal is to construct a custom link in the pop-up. Follow these steps (your exact steps may differ somewhat).

Step 1 – Click the layer options, then choose Configure Pop-up:

Step 2 - From the drop-down options under Pop-up Contents, choose A custom attribute display:

Then click Configure:

Step 3 – Configure the custom attribute display.

Using a custom attribute display you can use a combination of rich text, attributes, and links to create a custom information pop-up. For example, below we’ve combined a string with an attribute. Attributes appear as curly braces and can be selected from the attribute drop-down (the +). In the configured pop-up these will display the value from the feature attribute when the pop-up is opened.

Here’s the custom attribute display:

When saved, here’s what the pop-up would look like:

But we’re not yet finished. Our next task is to define a custom link that will add the APN to the URL to open the PIMS web page for each parcel.

We added the string “View PIMS Info,” selected it, then clicked Create Link:

In Link Properties we copied and pasted the URL from the PIMS site, including ?parcel=, then added the field {APN} at the end. We noticed there were four extra trailing zeros that we also needed to include after the APN. Shown below is the end of the URL, with the field {APN} passed as a parameter plus the trailing zeros.

Step 4 – Click Set to create the link, and save the pop-up.

The Result

The pop-up now looks like this, with the View PIMS Info hyperlink:

When clicked, the hyperlink opens the PIMS page for the parcel. Mission accomplished!

More Information

For more information see:

This post was originally published on October 4, 2012, and has been updated.

This entry was posted in ArcGIS Online and tagged , , . Bookmark the permalink.

Leave a Reply


  1. berniejconnors says:


    This is a great feature. I have just setup a similar web map for the parcel maps in my jursidiction with a link into our online land registry. However – what would make this map really useful is the ability to search for a parcel using the parcel ID number. Is ESRI working on a new feature for that would allow users to setup custom search fields? Currently we can display attributes in a pop-up but we cannot search our attributes.


    • Bern Szukalski says:

      Bernie – thanks for the comments. Yes, attribute display, queries, and query definitions on layers are in-progress, and should be available in the November update for ArcGIS Online.

      • berniejconnors says:

        Great! Thanks for the speedy reply.

      • berniejconnors says:

        Hey Bernie S, what is the update on “attribute display, queries, and query definitions on layers”?

        • Bern Szukalski says:

          berniejconnors – next week’s ArcGIS Online update will add new capabilities which address these. From the development version of the Help (subject to change):
          • Apply filtered views of feature layers—Map authors can now create filters for presenting focused view of feature data in your web map. You can answer simple questions such as, “What is in this dataset and what information applies to my work?” To the person viewing a filtered web map, the filter appears as just another layer in the map. For example, you might create a filter on crime data to only show arsons and petty thefts. You can also provide prompts and hints about the attributes in the layer as a way to guide your audience towards the information they are likely to be interested in.

          • Show tables—Anybody viewing a map in the map viewer can display an interactive table of the attribute information in the web map. Tables can be a useful way to quickly view the data in a feature layer of a map.

          More information will be available in the help once released, and we’ll cover these topic in more detail in future blog posts.

  2. Brett Lord-Castillo says:

    Maybe I am overlooking something obvious, but what if I have the entire url as an attribute?
    How do I make a link in a custom attribute display that uses the contents of that attribute for its url? I always get a message that the value entered is not valid.

    • Bern Szukalski says:

      Brett – I believe we’ve covered this in our email correspondences – for comment viewers the answer here is that this is not currently supported, but will be a future enhancement.

  3. ryan_a says:

    Is there any way to extract a substring of the field value result? In my instance I have a PLSS file that only has the Section-Township-Range as a single combined attribute with a dash separating (36-12-07). I need the Section Township Range without the dash to create a link to a pdf for the section(361207).

  4. maestro_red1 says:

    Hello guys! can this feature be used as an advertisement tool? say someone is browsing my map and sees a restaurant, then clicks on the POI and this pop up comes out already linked to the restaurant’s url?? if not, is there another ArcGIS online you can recommend for this kind of marketing concept? Regards, -Julio

  5. steinj14 says:

    How do you do this if you’re defining the web map via code and not using an ArcGIS Online web map? The only options I see for popup configuration is field, image, and chart. I need to create a link where I can pass in field values just like you did here.

  6. carrie.mack says:

    I have the same question Brett did:
    “Maybe I am overlooking something obvious, but what if I have the entire url as an attribute?
    How do I make a link in a custom attribute display that uses the contents of that attribute for its url? I always get a message that the value entered is not valid.”
    I have an ArcOnline map of city and watershed district boundaries, and I would like to send the map user to the website of the appropriate jurisdiction, but can’t find a way to make an attribute ( for example) to be a hyperlink. I’ve used the customize pop up window and used the hyperlink function/button to indicate that the URL be the field {website}, but it navigates to a nonexistent url that starts with\……and ends with my specification (\ to use the above example).

    • Bern Szukalski says:

      Using custom configurations you can have any text be a link. The blog post uses a concatenation technique to add the value from one field (APN in the blog case) to a URL string, passing the APN as a parameter.

      You can use any link you have in your attributes, though a better way to present that might be in a pop-up which lists attribute contents (the default) rather than a custom pop-up configuration. I can’t tell for sure what you are attempting to do, but if your map is public I can take a look. Send the link to your map to

      • quii'na says:

        Did you ever find out what was causing the prefix issue? In my case I have a complete URL link as an field. If I use the attribute as a link on it’s own, I get forced to a “page not found” with “” prefixing my valid link. If I do http://{link} it changes on the ‘/’ in the link to “%2f” which makes no sense at all!

        • aroust says:

          I’m having a similar issue with trying to link to documents on a local server. As a hypothetical, I’ve set up a link formatted like this: \\localserver\storage\image.jpg . Once I’ve saved that link in the pop-up window and go out to the map to test, the path changes to include at the beginning. End result:

          I enter: \\localserver\storage\image.jpg
          AGOL returns:\\localserver\storage\image.jpg

          • dforbuss_rvss says:

            I’m having the same problem. The link field I’m trying to use is “C:\folder\folder\example.dwg”. Mine actually adds “file:///” to the beginning, so now my browser doesn’t react at all when I click the links.

  7. johnenglish80 says:


    Is it possible to get feature geometries with this type of expression such as:{!shape.centroid.y@decimaldegrees!}&lon={!shape.centroid.x@decimaldegrees!}&v=p&o=n&type=ob&level=n

    Thanks, John

  8. cd65023 says:

    My URL parameters were working great up until the new updates hit last week 07/03/2014. When I click on the link, extra characters are added automatically like, “” and it is causing the link to not work. Any ideas?

  9. cd65023 says:

    span class=’esriNumericValue’

  10. ryanslakman says:

    Can you do this to create an email hyperlink? So if my field is {email}, what would i do to have it open outlook and send an email when they click on the link? I tried the html below but it didn’t work:


    • ryanslakman says:

      hmm, my html code didn’t go through on the post

    • Bern Szukalski says:

      I’ve found two ways to implement an email link in a pop-up. One is to use the email itself – e.g. – via a link you create in a custom attribute display, and the other is by adding a graphic (perhaps the person’s photo, or a generic email graphic) and then using the mailto: link as the link that opens when you click the graphic. Will publish a blog post on this, probably later today.

  11. mikehornes says:

    This is a great start. My problem is, I have 18,000 parcels. It isn’t feasible to manually input all this information. I am trying to do the same thing, in order to get this data out to our code enforcement staff. I have created a field in my attribute table for the appraisal districts url. I created a spreadsheet with the ownership data, which includes the Account number.

    Here is an example. I have an account number, say: R0001234 (this is made up). The appraisal districts url for this would be: Every accounts url is exactly the same, and the only part that changes is the account number. So, what I did was separate out the url into fields and then concatenate them to include each unique account. So now, I have an attribute table with all the correct url’s in my shapefile.

    My question is, how can I use that attribute field, which is a url, as a hyperlink in my popup? Without entering in each url for each parcel.


    Michael Hornes
    City of Palestine, Texas GIS Analyst

  12. clewis says:

    This is a great post and gives more info than the Configuring pop-up windos Help topic. I setup an attribute which does have the full url string. My question is can you specify a target parameter as done in a href tag like this -a href=”{Hyperlink}” target=”_self”>Click Here for more info‘ ?
    We are trying to switch our Google Map over to ArcGIS Online and users don’t want a new browser window or tab to open when they click on more info in the pop-up.

  13. kieran_npdc says:

    Hi Bernie,

    I am having issues with my links not working correctly from my Webmap. I am creating a parking map and want to include a link to the relevant web page for each car-park. I have a field called “Link” within the service I have shared which contains these URLs, which are definitely correct (as I can see them by viewing the layer’s table). However when I configure the pop-up to display {Link}, nothing is displayed (using both the custom attribute display and the default). Also when trying to set {Link} as the URL by using the insert hyperlink function, the link appears as expected however it only links back to the Webmap I am working on.

    Any help would be much appreciated.

    Cheers, Kieram

  14. gisdevel24 says:

    Can this be used to link only external websites or Can I use it open a file from a shared drive on a server?

    • Bern Szukalski says:

      You can link to files on your own infrastructure, but it must be a URL so you’ll have to set up a machine with IIS or similar if you haven’t one already. Also… If that server is not publicly accessible those files will not be available if your story map is public. Other alternatives for file storage include things like Box, Google Docs, etc.

      • chdischinger says:

        We have people adding goto links in their feature classes to go to a document stored in our network drives. Works great to launch a pdf from arcmap but in portal the hyperlink doesn’t work and gives us an Apache error. How can we configure the popup to go to utilize that shortened goto address?

        • Bern Szukalski says:

          I am not sure… You could try posting to the ArcGIS Server forum on GeoNet, assuming you are asking about an on-premises implementation using Portal for ArcGIS.

      • dbar7esri says:

        Hi – I have found that Box Google Docs, Dropbox, etc. all create links that are arbitrary/random strings. Does anyone know of a service where the string can include the file name in the URL? I need to avoid copying and pasting individual URL strings into a feature table containing the URLs. I want the URL field to be a concatenation of the web location and the file name. Example:
        Thanks, Doug

      • larrycamp says:

        New to this blog & thread.
        Does this mean that internal hyperlinks such as below won’t work in the Custom Attribute Display?

        \\501nvnas1\common2$\CADDScannedIMAGES\c501_UPC 68825.xlsx
        or this one to a “folder”?
        file://501nvnas1/common2$/CADDScannedIMAGES/PDF_DGN Files

        • Bern Szukalski says:

          Yes, those won’t work. It needs to be a URL, but others have told me they’ve setup one internally so that all those logged in on the internal network could resolve the location. As long as the location is resolvable, it should just work. But you’ll have to try this out and chat with your sys admin. I have tested this against local files stored in my localhost, and this works just fine. The key is to get a resolvable location across your internal network.

  15. micahw says:

    Hey Bern: Glad to see this Blog is still active.
    My question is about related tables. I have need for opening a url from the related table. User clicks on a parcel, scrolls down to see the “Show related table” and the attribute tables shows up to display that related data. now One of those attributes is a link (or partial, i can make it either way) to an image hosted on the cloud. Can that be put in?

    • Bern Szukalski says:

      Honestly I’ve not tried, and don’t think you can access related tables via the custom pop-up configuration. That said, the upcoming pop-up redesign should handle this.

    • brjosh says:

      I’ve been able to do this partially. The beginning of the URL is written into the pop-up config. The remaining portion (the part that changes based on the object) has been added to a separate field (i.e. field Pic1) Here’s an example:{PIC1}

      This works when I run a script to populate Pic1 in the layer from info in the table. However, if cannot view the images on another computer. I’m guessing something with the token from my script enables the images to be viewed?

  16. dtureal says:

    Es posible que simplemente la ventana de la ficha html, se abra directamente, sin que halla que dar al vínculo Wiew PINS Info

    • Bern Szukalski says:

      It’s not possible to open a HTML document directly in the pop-up. The only way currently is by linking to the web page from the pop-up. We are redesigning the pop-up, with the new implementation to be released sometime next year. Direct support for HTML documents is being considered.