Open msmith12345 opened 5 years ago
The underlying issue here is that those "default" values are written when the feature service is published; Collector/Aurora doesn't insert them.
For those who are interested there is a blog post published on how to modify feature services today to support required fields: Required Fields.
In the future we will be working to improve this across the platform (of which Aurora will be a significant factor).
Thanks Doug .. I will check out the blog.
Is it possible to get another redeem code?... I have not been able to locate the code.
Mickie Smith Senior Programmer Analyst (Specialist) Wildland Fire Prevention Engineering [CalFire2] Office of the State Fire Marshal (916) 568-2924 Email: Mickie.smith@fire.ca.gov
From: Doug Morgenthaler [mailto:notifications@github.com] Sent: Wednesday, October 3, 2018 10:05 AM To: doug-m/CollectorAuroraTesting CollectorAuroraTesting@noreply.github.com Cc: Smith, Mickie@CALFIRE Mickie.Smith@fire.ca.gov; Author author@noreply.github.com Subject: Re: [doug-m/CollectorAuroraTesting] Required Fields (#197)
The underlying issue here is that those "default" values are written when the feature service is published; Collector/Aurora doesn't insert them.
For those who are interested there is a blog post published on how to modify feature services today to support required fields: Required Fieldshttps://www.esri.com/arcgis-blog/products/collector/field-mobility/capture-required-information-from-field/.
In the future we will be working to improve this across the platform (of which Aurora will be a significant factor).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/doug-m/CollectorAuroraTesting/issues/197#issuecomment-426717088, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ApylsdqoabmBN9EfFdqVrW9QLh4LtYvYks5uhO5NgaJpZM4XGdGA.
Issue
The Collector will default text fields with a space and number fields with a 0 when we set up the database to require fields to be completed (e.g., Not Allow Nulls (aka) Required Fields).
We discovered a workaround; Modify the JSon Feature Layer; Layer Definition. Search for each symbology and change all the required fields with the Number data type from a 0 to ""; Search for each symbology and change all the required fields with a Text data type from " " to "" or Null.
Expected Behavior
When the database says to not allow nulls, do not automatically default the field with a 0 or a space.
Map and Credentials
Steps to Reproduce
If you define the field to not allow nulls, Collector will default the text field with a space and number field will a 0. The user must backspace to erase the space or 0. If the user does not erase the default value the information saved to the database will include the space or 0.
Device Information