Apologies... This one should work:
ArcGIS Idea - Collector - Independently select fields as required.
I've been trying to use the new Smart Editor widget to edit certain fields of a feature service,however, it's preventing me from saving these edits because, as far as I can tell, a 'required' field in the service must also be edited. As Josh White inquired in his original post, I'm also unclear how this field got flagged as being required (see image). More importantly, how can I remove this field requirement? Re-publishing the service is not an option as field crews are actively editing the data using Collector. I've tried editing the feature service URL by changing the field property from "nullable" : true to "nullable: false; however, this is not persisting after I update the layer definition. Any ideas on how to get rid of this feature service field requirement would be appreciated.
I meant to say I've tried editing the feature service URL by changing the field property from "nullable" : false to "nullable: true...
When I change 'Allow NULL Values' in Feature Class Properties on ArcMap Desktop from 'Yes' to 'No', it doesn't make the field required in my Geoform. It prevents the question from showing up in the form at all! Anyone else having this issue and know how to resolve?
I'd like to make questions required in my Geoform, but it seems the only question that can be required is the one used with symbology.
Thanks!
I don't know how far this question has gone but when I set required fields in collector 10.4.2, the warnings show but empty required fields are allowed to save without any prompt. Please is there any workaround to fix this?
Similar issue for me. Not using collector, but the webmap allows creation of features, with null values for required fields. I am seeing the yellow triangle indicator, but I would expect the 'close' (save) button to be disabled until all req fields are populated.
Thanks
How did you set the required filed? By not allowing null values?
Yes, exactly. Is there another way to do it?
Thanks
I have had this complaint for a while only to be told by ESRI Support this is the way the geodatabase works and based on my research is related to shapefile exports. Only some of the ArcGIS applications (Ie: Collector) will support the NON NULLABLE field property, while their flagship products (ArcMap, ArcGIS Pro, Web Maps) ignore it and post space values (in the case of string fields). Even the latest version of ArcGIS Pro when editing a local file geodatabase will "work around" the data model and not respect the NON NULL or REQUIRED FIELD settings. It seems rather pointless to have these tools around for fields if the platform is inconsistent with the way the are validated (or not).
I submitted this idea several months ago but it probably needs a better description after reading it again.
Fix Feature Services so they do not bypass the data model
Also here is a section from ArcGIS Help which states how these field properties will be dealt with when exporting to shapefiles but this seems to be the default behavior of most of the applications when editing a file, sde gdb or feature service with field properties set for NON NULLABLE or REQUIRED.
Defining feature class properties—ArcGIS Help | ArcGIS Desktop
Geoprocessing considerations for shapefile output—Help | ArcGIS Desktop
I really wish the tools (especially web maps) would not create a record if the user does not interact, complete the required or non-null fields or hit "x" on the form it just ends up creating a lot of garbage data. The web map actually creates the record before the popup comes up kinda of a bad design and does not have to be this way. Geometry can be stored in a memory along with the form attributes. Can you imagine if our bank transfers still went thru if we hit the "X" to close the window? Results in a confusing user experience and bad data the administrator has to clean up later.
Thanks Ronnie,
You have described what causes this issue well. The issue is that when publishing a default value of 0 or null is added, which is automatically added when editing in Javascript Applications. It was built this way to support the workflows in the past, but now results in an unideal user experience. There is a way to workaround this with ArcGIS Online Feature Services. When publishing a default value is added to the editing template. This default value can be changed to null through the feature Services admin API, which will result in records without required fields being rejected.
You can see this behaviour with the following web map where i modified the template for the field RatsFound to have a default of null:
To change this you will need to access the feature service admin api, and modify the template to include null the correct template value.
In this example, I changed the template from example A To example B in the updatedefinition call of the feature service admin:
Example A: Space for default value
{
"templates": [{
"name": "Rats",
"description": "",
"drawingTool": "esriFeatureEditToolPolygon",
"prototype": {
"attributes": {
"Inspection": null,
"DogBreed": null,
"RatsFound": ""
}
}
}
]
}
Example B: null for default value
{
"templates": [{
"name": "Rats",
"description": "",
"drawingTool": "esriFeatureEditToolPolygon",
"prototype": {
"attributes": {
"Inspection": null,
"DogBreed": null,
"RatsFound": null
}
}
}
]
}