Select to view content in your preferred language

ArcGIS Survey123 Updating Fields which are not available from form

528
3
09-12-2023 11:46 PM
RaghavGupta
New Contributor III

I have a scenario where I have integrated Survey123 with Workflow manager. I would like to know below points

1.) Is there a way I can calculate how many time a form has been submitted from survey123.

2.) What is the date of submission even when I am not capturing it from Survey123 .

3.) Date of closing the form.

Basically I want to create some fields in feature class that should not be visible in survey123 form and these fields should get auto populated while submitting the survey form. 

0 Kudos
3 Replies
TylerGraham2
Occasional Contributor

For question 1 you might add a hidden response in the survey with pulldata("@property", 'appVersion'). This would populate the field with data if they are going through the field app or web app, and would presumably be left blank if someone accessed the feature service directly to input data.  

I think 2 and 3 could be best handled by enabling editor tracking on the feature service.  

0 Kudos
RaghavGupta
New Contributor III

@TylerGraham2

Let's consider the following example

Initially Field Worker has submitted for review with Team Lead so submit count =1 and date of submission is 10/Sep, now it got rejected by Team Lead and sent back to Field Worker so now Field worker when does the work again then this time when the form is submitted again then the submit count is 2 and date is 11/Sep and so on and finally the date of approval is 12/Sep .

I want to count the no of times a field user has submitted the specific response to the Team Lead and all the dates when he has submitted it along with the closer date. 

In Editor tracking I think it will override the previous record or update the same record.

0 Kudos
TylerGraham2
Occasional Contributor

There really isn't a way to automatically do an incremental count in Survey123 since you get stuck in a dependency cycle when you try to pull a value from a field and add to it and try put it back in that field. It's like the time travel paradox of going back in time to kill a parent before you were born.  

You might try a repeat for rejections and track the date of rejection, or see if you can pass the edit date to the repeat. Then setup a field in the repeat with a value of 1 for each reject and sum those up in the form outside of the repeat for an aggregate value. The links below have some useful guidance on how to do that.  

https://support.esri.com/en-us/knowledge-base/how-to-calculate-the-sum-of-repeats-in-arcgis-survey12...

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-repeats/ba-p/89804...

0 Kudos