Default Values not working in Field Maps Mobile

9446
33
Jump to solution
11-15-2021 07:26 AM
KristinThorpe1
Occasional Contributor

I have a hosted feature layer named "Construction" that I am using to show the location of construction site projects. When I add a new point, I want the "Construction Phase" field to default to "Active Site" (aka domain 7). As far as I can tell, the feature layer is set up correctly to assign this default value. If I use Map Viewer to add a new point, the Construction Phase defaults to "Active Site" like I want, but when I use Field Maps mobile, the default is not assigned. This work flow will most likely be used with Field Maps mobile and will create issues down the road if the default value is not set. 
Am I missing something? Why is the default value not being set in Field Maps but working everywhere else?

2 Solutions

Accepted Solutions
DougGreen
Occasional Contributor II

Kristin, I'm not sure what's going on with yours and I just realized yours is a hosted feature layer. We have a non-hosted enterprise feature layer. But here's what just fixed it for us.

  1. Remove the defaults on the layer and save
  2. Add the defaults back and save

For us, we had to republish, but with yours being hosted, I'm not sure you can republish. But you could simply try removing the defaults and re-adding them.

View solution in original post

SophieWatts
New Contributor II

I spoke with Esri and was informed of the following bug: BUG-000144318 - When you publish a layer from ArcGIS Pro to ArcGIS Online that has default values set on at least one field and there are existing features the default values will not show up in ArcGIS Field Maps web app Smart Form Templates.

They informed me of the following workaround:
You can export a FGDB in ArcGIS Online from the hosted feature layer that has these default values setup and then publish a new hosted feature layer copy from this FGDB. This copy will not exhibit the behavior. Note that this will be a distinct layer and will not have a service definition. Meaning that you can't overwrite it from ArcGIS Pro like the original layer.

View solution in original post

33 Replies
DougGreen
Occasional Contributor II

We are just experiencing the same issue after upgrading our ArcGIS Enterprise to 10.9.1. It was working before the upgrade in Field Maps and is no longer working. This post indicates that it might be an issue with Editing Templates and that templates are only going to be supported for hosted feature layers. We have a lot of benefits of managing our own data in an enterprise GDB and don't like the thought of moving all of our enterprise data to the hosted environment. However, in my opinion, if it was working before, and now it's not, this would have needed a deprecation notice since we have lot's of workflows built on our enterprise feature services. Therefore, I think this feels like a bug.

JeffGearhart1
New Contributor

I am also seeing the same issue with default values not appearing when data is collected using Field Maps and the older Collector app. Our asset management system relies on these default values in order for our GIS assets to successfully sync over. We would also prefer not to use hosted feature layers as we have built our system using an Enterprise GDB. 

DougGreen
Occasional Contributor II

Kristin, I'm not sure what's going on with yours and I just realized yours is a hosted feature layer. We have a non-hosted enterprise feature layer. But here's what just fixed it for us.

  1. Remove the defaults on the layer and save
  2. Add the defaults back and save

For us, we had to republish, but with yours being hosted, I'm not sure you can republish. But you could simply try removing the defaults and re-adding them.

KristinThorpe1
Occasional Contributor

Hi Doug! Thanks for the insight. I believe I ended up republishing the layer and that seemed to fix the issue. When I first published, I didn't set a default value, so I went into the REST service and did it that way which only worked half the time. When I republished, the default was set from the get-go and the problem was fixed. Not sure exactly what happened, but looks like a classic "have you tried turning it off and back on again" solution!

AbiDhakal
Occasional Contributor III

Hello@DougGreen

In ArcGIS Field Maps, when I try to change the default value it is greyed out. It shows the default value I set in ArcGIS Pro that I'm using in another Field Maps project, but I want a new default value for this new project and I cannot change it to a new default value. It is greyed out in the template too. I will appreciate your input.

Thank you,
Abi

0 Kudos
SophieWatts
New Contributor II

Hello - I'm having a similar issue.

A default value is set in ArcGIS Pro, the default value shows as such in AGOL, but when adding a point with Field Maps there's no default value showing and leaving it blank results in '-' being collected as opposed to the default value. Any ideas?

- I've tried removing and adding the default value in Pro and overwriting the web layer

- I can't add a default value in the Data properties of the web feature class 

SophieWatts_0-1647884786516.png

SophieWatts_1-1647884813520.png

 

0 Kudos
CraigGillgrass
Esri Regular Contributor

@SophieWatts have you tried setting the Default Value for the field on the Templates tab?

0 Kudos
SophieWatts
New Contributor II

No default values show in the templates tab on field maps... but it shows in the data area of the web feature layer. 

CraigGillgrass
Esri Regular Contributor

ok, are you able to set the Default Value for the field under Templates and does that then allow the Default Value to show up in Field Maps mobile?

0 Kudos