I am trying to connect a hosted csv file to one of my surveys, but when I try to select an option in the survey, all the options appear as "label" instead of the actual data from the file.
The csv has been uploaded to my ArcGIS Online account and linked to the survey. The number of matches in the pull down also equal the number of items within the csv file so I know it is reading something correct. Any ideas what could be causing this error?
Solved! Go to Solution.
You did not post any of the code but are you use search() like this
select_one SpeciesList autocomplete search("CSVFileName', "matches", "AllWithoutNone", "Y")
If so did you add the column mapping in the choice tab like this. That tells it which columns to use in the csv since they do not have to be name and label.
Hope that does it.
should be select_one Operations_Staff (so remove the .csv). Also you cannot end a field name with _ I think. Remove that.
And you matches query looks like you have mine in there? You want your own query that makes sense or remove it. If you do not need a query then instead of search you could do select_one_from_file instead and remove the list from choices tab. Seems like you are trying to do both vs one or the other.
Hope that helps
I am trying to reference a CSV hosted online so every time our staff changes I do not have to update multiple surveys. The CSV is simple; it is a single field of staff names with a header called "name". I am not trying to do any query really. I tried select_one_from_file first but the same issue continues to happen
Ok I would then use select_one_from_file Observers.csv like that instead. Then use the Linked Content tab to link to the CSV that you host on AGOL.
Go to 22:51 in this video https://www.youtube.com/watch?v=rrQZNaqcCYI
That is what I did originally. I the tutorials online, and I seem to be accessing the CSV because the number of matches in the list corresponds with the number of names in the CSV. The issue is that the names from the list are not appearing but the word "label" repeatedly. So it seems to be misreading the CSV file? I am not sure if this was a common error or not