Greetings, Hydrant inspection time.
I need to mark an "inspected Date/Time" in collector for an inspection of an asset. This time must be static and using the "Last Editor" date/time stamp overwrites when edits are made to the asset (Repairs for example of reported defects). I have created an "Inspected" field and made the parameter "Null Allowed" unchecked in ArcGIS Pro.
This fills the field with a default value of "12/30/1899" and does, in fact, satisfy the "Null Not Allowed" condition so it's worthless to us.
Is there a way to create a date/time field, with NULL values in it, so that when a user opens collector they MUST collect the time of action? (in this case an inspection).
Thank you.
Hi James -- What version of ArcGIS Pro are you using? To create required fields requires Pro 2.1 or later. Otherwise, you'll need to run a script (collector-tools/ResetRequiredFields.md at master · Esri/collector-tools · GitHub) on your hosted feature layer. See Get the essential information from your field workforce using Collector for ArcGIS.
We tried out the tool and were successful, so a couple of follow-up questions for you:
I ran the script in Pycharm but didn’t copy it to the “C” drive.
Pro Version is 2.2.4 It auto updates usually
The feature layer is hosted on AGOL. It’s this:
https://nwfd.maps.arcgis.com/home/item.html?id=d6ab6797967f4c409d328c6f92445b2a (I’ve shared it with ESRI Support)
Versions of Python
import matplotlibimport numpyimport scipyprint(sys.version)print(matplotlib.__version__)print(numpy.__version__)print(scipy.__version__)
3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41)
2.2.2
1.14.2
1.0.1
I’m going to try run this script again.
Unfortunately the standalone python does not take me to the script:
Hi James,
Thanks for the information. I have a few questions for you to help me summarize where you're currently at with this issue and how we should proceed forward:
- Just for clarification, currently you cannot successfully run any of the Collector tools either from the toolbox in Pro or as stand-alone scripts. Is that correct?
- Or does this only effect the Reset Required Fields tool?
- Also, just for clarification, are those downloaded scripts and toolboxes located on the local machine they are being ran from or are they currently stored on a network drive?
- Can you also please elaborate on your last comment when you say "Unfortunately the standalone python does not take me to the script:"? I have reviewed the attachment, but are saying that you cannot run the script at all standalone?
Thanks for the information
-Kevin
Thanks for the reply Kevin, unfortunately, my lack of understanding of how to go from python script to toolbox and back out to python script has unfortunately caused me to reach the end of the road on this. The script screen shot a couple of posts above references C:\ProgramFiles\To answer your questions:
Thank you to everyone that tried to help me get this to work.
I did finally find the python script for reset_required_fields_python_api.py