Default values do not display in Field Maps Mobile or Web Map

3360
22
Jump to solution
05-16-2022 03:21 PM
JanetSilb_Spike
New Contributor III

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.  

JanetSilb_Spike_0-1652739538627.png

 

0 Kudos
22 Replies
JanetSilb_Spike
New Contributor III

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")

TKSHEP
by
New Contributor III

Why would the option for calculated expressions in the field map not show?

0 Kudos
JustinReynolds
Occasional Contributor III

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.

- Justin Reynolds, PE
0 Kudos