I need to create a browser based survey that at first, searches through a list of addresses within our city. I understand I can do this using a CSV and the pull data function but how is the data updated? If I run a script to update the CSV do I have to republish the survey each time?
Yes, the survey will need to be republished when the CSV is updated. That can be done either manually or automatically; see Updating the media folder of a Survey123 Form item for information on how to automatically do this.
Separately, I'm having issues using the csv for user selection. Do I need to do pulldata function and then select_one or can I just select_one and reference the csv?
I would suggest first having the pulldata function populate a text or note question to confirm that you are seeing teh values you expect - in particular, extra commas in the table can cause the wrong values to be retrieved.
I've created the file and uploaded it using Survey123 Connect but an error occurs when I run the script. Am I missing something?
Traceback (most recent call last):
File "<string>", line 105, in <module>
102 print ("...Querying")
103 # get the name of the zip file
104 serviceInfo = getServiceDefinition(agol_helper.token, itemID)
105 zipFileName = serviceInfo['name']
106 print ("Zip file name: " + zipFileName)
That error indicates that the script had an issue getting information via the feature service. Is this using an existing feature service? You may want to create a hard-coded version with the name of the zip file (same as the XLS file) pre-set in that case.
I changed the links in the script to https and that seems to have fixed it.
However, the script doesn't seem to be updating the data. I'm using the external choice list option. The script completes successfully but the choice list isn't updated.