Inspection Date/Time Required Data

1787
6
01-02-2019 02:08 PM
Labels (1)
JamesLong
New Contributor II

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.  

0 Kudos
6 Replies
Kylie
by Esri Regular Contributor
Esri Regular Contributor

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.  

Esri Education Team
0 Kudos
JamesLong
New Contributor II

Thank you for the reply, I downloaded and ran the tool, however I got this error message:

0 Kudos
Kylie
by Esri Regular Contributor
Esri Regular Contributor

We tried out the tool and were successful, so a couple of follow-up questions for you: 

  • Have you tried copying the script to your computer's C drive and running it from there?
  • What version of Pro are you using?
  • Does the Feature Service ItemId go to a hosted feature layer (as opposed to an ArcGIS Server service that was added to ArcGIS Online as an item)?
  • What version of python do you have installed? (You can find out by following the steps in the ArcGIS Pro section of https://support.esri.com/en/technical-article/000013224)
Esri Education Team
0 Kudos
JamesLong
New Contributor II

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:

0 Kudos
KevinBurke
Esri Contributor

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

0 Kudos
JamesLong
New Contributor II

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: 

  • I "cannot successfully run any of the Collector tools either from the toolbox in Pro or as stand-alone scripts"
  • "Or does this only effect the Reset Required Fields tool?"  I really haven't tried other tools.  
  • "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?"  A local Drive, my second hard drive (Not C:) which is my data drive.    My Docs\Arcgis\Projects\Hydrantmanager is the folder where it is.  I have added the toolbox to my project file and will try again.    Then it's going to be a call to tech support.  No Joy:

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

0 Kudos