I have Enterprise 11.3. I'm in a webmap trying to learn Arcade expressions. I have a layer highlighted in Contents panel, show Properties, click on Popup > Attribute Expressions > Add expression. In Arcade expression window, I click on Profile variables and there is no $map variable, only $feature, $userInput, and $graph. I tried ArcGIS Online too but I don't see it in there either.
https://developers.arcgis.com/arcade/profiles/popup/
With the help of ESRI tech support, I was only able to see $map Profile variable would work if I added a feature layer to a webmap using "Add layer from URL":
All of my layers in the webmap were added by using "Browse layers" and then adding the "Map Image Layer." I guess I missed the documentation that spells this out.
Seems odd to me that this is the only way to access a $map Profile variable. I'm still hoping for suggestions before I have to change all of my webmaps. . . . . .
Ironically, I'm not seeing $map when I do add a feature (service) to AGOL using 'Add layer from URL'.
Update to my previous post, with the help of information at https://community.esri.com/t5/arcgis-enterprise-questions/arcade-map-not-defined-inside-popup-expres... I am able to see $map when I add the FeatureServer URL. If I add the MapServer URL I do not see $map.