Hi, I have set a default value for a Switch field in both the Field Maps form builder, and in AGOL. It looks good in the Field Maps web app, shown in the screen shot below, but in the mobile app or using the edit tool in the web map it looks like there is no default value set. I read a similar thread to this that was resolved, but in that case the feature layer was published from Pro. In my case, I created the hosted feature layer in AGOL from a zipped shapefile. The layer does have existing records if that makes a difference.
Solved! Go to Solution.
Thanks to @JustinReynolds we were able to resolve this. NEW features will reference the template and stored default values. However because our layer had mostly existing features to be edited, they didn't reference the template or therefore the default value. Instead we added a calculated expression so that if the field "Condition Assessment" was not empty, then the "Completed" field was set to "Yes" (the default value I want).
Calculated Expression:
iif (!IsEmpty($feature["Condition_Assessment"]),"Yes","No")
Why would the option for calculated expressions in the field map not show?
It wouldn't show if you haven't selected a field form element. It also won't show if you have a group form element selected instead of a field in Field Maps Web App.
Also, if you are using ArcGIS Enterprise < 11.0.0, the option will never show. You can only author calculated expressions using Field Maps in ArcGIS Online or ArcGIS Enterprise 11.0.0 at the moment.