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
- Start ArcGIS Pro and open the project.
- In the Contents pane, right-click the feature class and click Configure Pop-ups to open the Configure Pop-ups pane.
- Click Expressions, and click New.
- In the Expression Builder dialog box, configure the following parameters for the Arcade expression:
- For Name, rename the new expression.
- For Title, specify a title for the new expression.
- 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>')
- Click OK.
- Click Expressions, and click New.
- In the Expression Builder dialog box, configure the following parameters for the Arcade expression:
- For Name, rename the new expression.
- For Title, specify a title for the new expression.
- 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')
- Click OK.
- In the Configure Pop-ups pane, click the Back icon, and click Edit pop-up element.
- Toggle the HTML mode option on to enter the HTML mode.
- 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 image below shows the configured pop-up whereby the pop-up does not display the hyperlink when the point selected is not a college.