Force recaculation for all surveys

224
2
Jump to solution
09-02-2021 08:53 AM
JoeLedvina
New Contributor

I have developed a survey form with several calculations, but I am not authorized in my organization to upload surveys to our AGOL, I have to pass them along through another person. My form uses pulldata to bring in a 1 or 0 from a "natives.csv" in the media folder.

I had confirmed that my calculations worked properly in Survey123 Connect on my computer, and I have completed 81 surveys. I was reviewing the data, and I discovered that the pulldata field was consistently empty, which caused later calculated fields to always equal 0. I asked my colleague if the csv was included in his copy of the survey, and he he had it: ./media/media/natives.csv so I don't believe it was included with the form.

Once we have the csv in the correct location and re-upload the survey, is there any way to force survey123 to recalculate all of the surveys?

The alternatives I have are onerous:

From what I understand, the calculations are done automatically when the survey is submitted. I can edit and re-submit each of the 81 surveys using the form view on survey123.arcgis.com, but it takes 20-40 seconds for the form to open, then another 20-40 seconds to reload after I click the "edit" button, then another 20-40 seconds to be able to open the next record.

I can edit data in the map viewer tables, but I would then have to manually calculate several subsequent calculations, so I would have to change 324 cells in the feature's attribute table. The pulldata field is in a repeat, so I would have to edit 2,046 rows in that table.

I have not tried editing in ArcMap and I do not have ArcGIS Pro, but it is possible that I may be allowed to use someone else's to make these edits, but I don't think either would make things any easier.

Are there any other workarounds that could make bulk editing like this easier?

0 Kudos
1 Solution

Accepted Solutions
Philip-Wilson
Esri Notable Contributor

Hi @JoeLedvina,

Yes, it looks like the CSV file was not in the correct folder, for pulldata() calculations it needs to be directly in the media folder of that survey.

There is no quick or easy way to update all the surveys, especially if you have questions that need to be re-calculated. Do you still have all the surveys on the device that sent them (in the Sent folder), otherwise do you use the Inbox?

I would suggest if you do have the surveys still in Sent folder, then publish the survey update from Connect with the CSV file in media folder, then download the survey update on the device. Do not delete the survey or it will remove all the survey entries from the Sent folder. After the update, you can open each survey one by one from Sent folder using the edit option. Make sure all the calculations update (you may need to select the recalculate button) for each question, and then submit the survey again. In some cases calculations do not automatically update if you are in edit mode, depending on the values and calculations in use. The user must manually update them using the button next to the input box.

If you do not have the surveys in Sent folder or access to that device, enable the Inbox for this survey, if not already, and then download them to the device, open each one up with edit option and update all calculations and submit again. You coudl even filter the Inbox to only download the ones you need to update.

As you mention, the only other way is to edit in the Survey123 website via Data tab and edit option, or open in the surveys in edit mode via web app URL, both of these will have option to update the calculations, as they are Survey123 products so will read the XLSForm.

Otherwise you can edit in the table view in Map Viewer or ArcGIS Pro. But as you point out, with these otpions you will need to ensure the calculations all get updated manually (type the values in), as these products can not read the XLSForm so can not update the calculations.

Regards,

Phil.

View solution in original post

0 Kudos
2 Replies
Philip-Wilson
Esri Notable Contributor

Hi @JoeLedvina,

Yes, it looks like the CSV file was not in the correct folder, for pulldata() calculations it needs to be directly in the media folder of that survey.

There is no quick or easy way to update all the surveys, especially if you have questions that need to be re-calculated. Do you still have all the surveys on the device that sent them (in the Sent folder), otherwise do you use the Inbox?

I would suggest if you do have the surveys still in Sent folder, then publish the survey update from Connect with the CSV file in media folder, then download the survey update on the device. Do not delete the survey or it will remove all the survey entries from the Sent folder. After the update, you can open each survey one by one from Sent folder using the edit option. Make sure all the calculations update (you may need to select the recalculate button) for each question, and then submit the survey again. In some cases calculations do not automatically update if you are in edit mode, depending on the values and calculations in use. The user must manually update them using the button next to the input box.

If you do not have the surveys in Sent folder or access to that device, enable the Inbox for this survey, if not already, and then download them to the device, open each one up with edit option and update all calculations and submit again. You coudl even filter the Inbox to only download the ones you need to update.

As you mention, the only other way is to edit in the Survey123 website via Data tab and edit option, or open in the surveys in edit mode via web app URL, both of these will have option to update the calculations, as they are Survey123 products so will read the XLSForm.

Otherwise you can edit in the table view in Map Viewer or ArcGIS Pro. But as you point out, with these otpions you will need to ensure the calculations all get updated manually (type the values in), as these products can not read the XLSForm so can not update the calculations.

Regards,

Phil.

0 Kudos
JoeLedvina
New Contributor

Thank you, Phil,

That's what I was afraid of. I guess we will enable the inbox and use a device (probably Survey123 for Windows). It does seem that that should go a little faster than the website.

Joe