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

1691
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
1 Solution

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

View solution in original post

22 Replies
JustinReynolds
Occasional Contributor III

@JanetSilb_Spike 
You will probably need to set the default value in the feature template for it to behave as expected.  I suspect that you will need to do this from the map viewer classic unless that field already has a default value assigned in its feature template, then you could manage it from the Field Maps Web App.

 

When editing the feature templates in map viewer classic, there is no need to save the map, just save the templates.

Edit Session -> ManageEdit Session -> Manage

Edit Default Value then save templatesEdit Default Value then save templates

- Justin Reynolds, PE
0 Kudos
JanetSilb_Spike
New Contributor III

Thanks Justin. I read NOT to open the associated web map in Map Viewer Classic or you could lose the settings from your Field Maps smart form. So I have been working between the new Map Viewer and Field Maps web app (& mobile app).  

JustinReynolds
Occasional Contributor III

Are you in ArcGIS Online or Enterprise.  Opening the map in map viewer classic isn't what did that, it is saving the map in map viewer classic.  There is no need to save the map in map viewer classic, the templates save button is separate.  In AGOL, saving the map in map viewer classic won't nuke your form anymore, but it will mess with your layer order if you have grouped layers in map viewer.

- Justin Reynolds, PE
0 Kudos
JanetSilb_Spike
New Contributor III

I’m in AGOL, & I do have grouped layers in Map Viewer, but sounds like that’ll be ok if I just save the template in MVC. 

0 Kudos
CraigGillgrass
Esri Regular Contributor

To clarify @JanetSilb_Spike ; assuming you're using Online, you can open the web map associated in Map Viewer Classic as it was updated to maintain the form information.  If you're on Enterprise, this may differ depending on what version of Enterprise you are on.

The only caveat is to not make updates to the web map in Map Viewer and Field Maps web app at the same time; i.e. in 2 different tabs or browsers, that will cause issues and potential data loss.

Craig

CraigGillgrass
Esri Regular Contributor

@JanetSilb_Spike You should be able to set the Default Value for that field on the Templates tab in Field Maps.  It's the tab to the right of the Forms tab at the top that you've selected.

If this doesn't work, please let me know.

Craig

JanetSilb_Spike
New Contributor III

Thanks Craig,

It does show up in the template, already set to the default value I assigned, yet no value displays in the web map or mobile app.

JanetSilb_Spike_0-1652741452592.png

 

CraigGillgrass
Esri Regular Contributor

@JanetSilb_Spike You may need to reload the web map in mobile for the Default Value to take effect.  If that doesn't work - can you invite "craig_sp" to a group with the map in it so I can take a look?

Craig

JanetSilb_Spike
New Contributor III

Sure, I will try that in the morning & let you know. Thanks!

0 Kudos