Good morning,
I am looking for a way to populate automatically the time when an inspector starts an inspection with arrival time and when the inspections is completed with departure time.
How do I populate these fields automatically.
For arrival time can populate when the form opens.
How to populate departure time, when the inspector finish the inspection? Is there a way to submit the form?
Thanks
Hey @JoseSanchez
This is kind of a backwards solution/idea, when the user arrives at site, you can use an IIf(IsEmpty()) to check to see if there's a value in the start date field, then use Now() to get the date and populate once it's opened. Once submitted, if you have editor tracking turned on, once the submission occurs, the last_edited_date will be the date of the submission or finish. You may have more luck using Workforce for this, but it's being depreciated as it will tell you the start and end time, I believe Field Map tasks may pick this up, but I haven't used that yet!
Cody
I don't have the solution for you. But an idea. Similar to what @JoseSanchez suggests. Using ArcGIS Workforce. But maybe not using it.
Workforce captures a start time by changing the Status field to Start. When a User changes this value, another filed is calculated with a timestamp of the change.
So, a User would toggle a Start value, which will log your start time.
Then the Submit button will capture the end time
Hope it works
Aaron
Is Workforce going to be deprecated?
What about this solution?
Solved: Auto-filling date-time start and end for a polylin... - Esri Community
The Logic in the solution link seems like it will work.
When a user opens the Form, it captures start time via cod shown.
When a user completes or Submits Form, it populates with submit date/time.
This is better than my suggestion, as no toggle of Status is needed, if it works.
Best f luck, looking forward to hearing if it works or not 🙂
Aaron
Hi @JoseSanchez
I would start with what Cody suggested and use the IIf Empty then use Now() for arrival
When departing you might want to have a field that users fill in when a job has been completed and the arcade would look something like the following:
When($feature.inspection_status == 'Completed', Now(), $feature.departure_time)
An alternative you could use a "Submit" button via conditional visibility
While Field Maps doesn’t support custom buttons, you can:
• Add a field called submit_inspection (boolean).
• When toggled to true, use an Arcade expression to populate departure_time .