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?
Solved! Go to Solution.
You could also contact Technical Support and have your case associated with that bug number or this one BUG-000146187; both point to the same issue.
I've run into the same issue and ESRI told me that the BUG is still active. 1 of 6 layers in a Hosted Feature Layer, which were all set up similarly when the schema and map were designed in ArcGIS Pro, had default values on two fields which were not recognized by ArcGIS Field Maps. ArcGIS Online would not let me remove the default value from the field. ESRI attempted several solutions, none of which worked and they are still working on my case. ESRI's solutions were somewhat long and involved and included things like exporting to a gdb on ArcGIS online and then publishing a new layer from that gdb.
While ESRI is off doing some testing...
I figured out my own solution. The solution for me was to delete the fields in ArcGIS Online and then add them back in (also in ArcGIS online) in exactly the same way (with the same default values, same domain entries, same field type, same length, same name and same alias). If I had needed to keep the data in the fields, I would have added and calculated temporary fields to hold the current values before deleting the offending fields, then after adding the new fields, calculate them from the temporary fields, then delete the temporary fields. When I opened my maps, in which I had previously customized the layers and forms, everything was working as expected - the fields which had been replaced showed up as they should without even having to re-add them to the forms.
You'd think we'd have advanced beyond that workaround in 2022...alas...job security.
Tried deleting field and readding it. Still doesn't work for me.
Another workaround: Set your default value using the feature templates
Not a workaround, but if you don't need a 'default' and instead need to set the value in a field, you can use Arcade to do that in the Field Maps form.
My problem is for a table. I don't think I can set feature templates for tables?
I'll see what I can do with arcade.
Thanks!
The issue with Arcade is you can calculate a field, but you cannot calculate a default value for a field.
ArcGIS field maps forms have come a long way, but have a long way to go to get near the power available to us in Survey123.
Good luck!
You can do it with a table.
Default fields still not working in field maps.
This is what worked for me: