HOW TO
In Portal for ArcGIS Map Viewer Classic, Arcade conditional functions can be used to reference a field of an attribute table to display an image in a pop-up when the conditions are met in the Arcade expression.
As an example, this article provides instructions using the Arcade expression to apply conditions to the pop-up display for images to be shown only when the Local Deliveries Allowed field value is not 'N' in Portal for ArcGIS Map Viewer Classic.
Note: The workflow below utilizes the replace Arcade function to replace the Truck Restriction field alias, 'truckrestr' field value from 'N' to 'No', and 'Y' to 'Yes'.
next to the layer, and click Configure Pop-up.

return iif($feature.truckrestr == 'N', 'none', 'inline')


button to switch the view to HTML Source.
<div style="display:{expression/expr1};"><img alt="" src="https://<portal_URL>/portal/sharing/rest/content/items/<itemID>/data?token=<tokenID>" /></div>


The image below displays the pop-up when the 'Truck Restriction' field value is 'No'. The logo does not appear in the pop-up.

The image below displays the pop-up when the 'Truck Restriction' field value is not 'No'. The logo appears in the pop-up below the table.

Article ID: 000027864
Get help from ArcGIS experts
Start chatting now