Updating an existing survey record status with a timestamp - what's the best survey structure?

722
2
02-14-2019 08:53 AM
KendraHopper2
New Contributor II

Hi there,

There is a requirement to timestamp an "incident's" status change in order to keep track of the the length of time it took to resolve the incident from start to finish. Many different incidents may occur at the same time, and can remain 'open' for varying lengths of time.  

What is a recommended way of setting up the form to capture the timstamped sequence, and not overwrite existing record data?

Instead of creating a new survey point, the thought is to leverage the "Edit and resend survey" functionality via the Sent Inbox.

Already tried:

- Repeats: The begin/end repeat looks clumsy and is not intuitive for displaying the current status and changing that status to the next step. Maybe there are some tricks with the use of appearance and relevant that could make this more user friendly?

- Unique fields for each status timestamp: unfortunately the Update overwrites existing values with nulls. New status, has a timestamp of New_datetime, Resolved has a timestamp of Resolved_datetime. If the Newdatetime value isn't carried through, it is updated with a null value when the resolved status is chosen. Is there a way to carry the values through?

This is very challenging to describe! But I would be greatly appreciative for any suggestions.

Thanks!

Tags (3)
0 Kudos
2 Replies
BrentKinal1
Occasional Contributor III

If you just need the time the survey was started and ended you can use the question types "start" and "end".  Start will record the time the form was first opened End will record the time the form was last submitted. Start will not update on subsequent edits through the inbox End will update each time you update the form. If you need to the record each instance the status changes in between "start" and "end" things get a little more complicated, it might be best to wrap that workflow in a repeat collecting all the info that won't change in the parent form and status updates in the related / repeat portion of the form, you should be able to pull the most current "status" value from with in a repeat by a simple calculation "selected(${status})" in to a note field in the parent form.

0 Kudos
KendraHopper2
New Contributor II

Just an update, the final decision was to use the Repeat group to add the new Status with a timestamp as a related record to the incident. The aesthetics came secondary to the functionality to track the sequence of Status changes. 

There is a "CurrentStatus" field in the the Parent Record that is updated by the related "New Status" using the Calculation "jr:choice-name(${NewStatus}, '${NewStatus}')". This allows for display of the most recent status on the form, but also for mapping symbology of the point.

The use of the "bind::esri:parameters" "query orderBy="IncidentDateTime DESC"" will be useful when it is working again (at 3.2.196 this functionality does not presently work, but is on the list to be fixed). This will ensure that the most recent Status will be first on display on the form within the list repeats.

Once this record has been submitted, it cannot be updated. If the status of the incident changes, a new record is made.

0 Kudos