HOW TO
In Portal for ArcGIS and ArcGIS Online Map Viewer, it is sometimes necessary to hide a specific date value of a date field in the pop-up of a selected feature. This can be achieved by using the Arcade functions, IIf() and Text().
In this example, the date to be hidden is 1/1/2023. From the attribute table, the date value is only associated with the KLCC Drive line feature.
IIf((Text($feature.<dateField_name>, "M/D/YY") == "<condition_date>"), "<value_if_true>", <value_if_false>)
This is the expression used in this example.
IIf((Text($feature.LoggedDate, "M/D/YY") == "1/1/23"), "", $feature.LoggedDate)
The date value for the KLCC Drive line feature equals 1/1/23, so the date is not displayed in the pop-up. Otherwise, the date value in the LoggedDate field is displayed when other line features are selected.
Get help from ArcGIS experts
Download the Esri Support App