HOW TO

Display hyperlinks in pop-ups based on conditions using Arcade expressions in ArcGIS Pro

Last Published: October 28, 2022

Summary

In ArcGIS Pro, Arcade expressions can be used to format the text and hyperlinks displayed in a pop-up according to the specified conditions. This article provides an example and instructions using Arcade expressions to configure the text and include hyperlinks for pop-ups in ArcGIS Pro.

Procedure

  1. Start ArcGIS Pro and open the project.
  2. In the Contents pane, right-click the feature class and click Configure Pop-ups to open the Configure Pop-ups pane.
Opening the Configure Pop-ups tool of the feature class from the Contents pane
  1. Click Expressions, and click New.
The New option in the Configure pop-up pane
  1. In the Expression Builder dialog box, configure the following parameters for the Arcade expression:
    1. For Name, rename the new expression.
    2. For Title, specify a title for the new expression.
    3. Specify the following Arcade expression to define the text to display if the condition is met or not in the Expression section:
return iif($feature.<fieldName> == <fieldValue>, '<fieldValue1>', '<fieldValue2>')
  1. ​​​​​Click OK.
The Expression Builder dialog box with an example of the Arcade expression
  1. Click Expressions, and click New.
  2. In the Expression Builder dialog box, configure the following parameters for the Arcade expression:
    1. For Name, rename the new expression.
    2. For Title, specify a title for the new expression.
    3. Specify the following Arcade expression to display the link based on one of the two values, 'none' (hide) or 'inline' (show) in the Expression section:
return iif($feature.<fieldName> == <fieldValue>, 'inline', 'none')
  1. ​​​​​Click OK.
The Expression Builder dialog box with an example of the Arcade expression
  1. In the Configure Pop-ups pane, click the Back The Back icon icon, and click Edit pop-up element.
The location of the Edit pop-element icon in the Configure Pop-ups pane
  1. Toggle the HTML mode option on to enter the HTML mode.
  2. In the Text Options pane, specify the following HTML script.
{expression/expression0} <a href="<webpageURL>" style="display:{expression/expression1}" target="_blank" rel="nofollow">(<b><URLDisplayText></b>)</a>

The image below shows the configured pop-up whereby the pop-up displays the hyperlink when the point selected is a college.

The configured pop-up window displaying the hyperlink and the Configure Pop-ups pane

The image below shows the configured pop-up whereby the pop-up does not display the hyperlink when the point selected is not a college.

The configured pop-up window with the hidden hyperlink and the Configure Pop-ups pane

Article ID: 000028581

Software:
  • ArcGIS Pro 3 0
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options