Select to view content in your preferred language

Editing csv file in Portal possible?

922
4
01-25-2023 10:51 AM
GregKeith
Frequent Contributor

I have some csv files in Portal used for choice lists in Survey123 forms. Is it possible to edit these in Portal, e.g. add/delete/update records, or do I have to upload an entire new file with the same name? I'm thinking the latter, but hoping for the former 😏, similar to appending data to a feature layer.

Or is it possible to convert the csv file to a table and use that instead?

0 Kudos
4 Replies
IsmaelChivite
Esri Notable Contributor

Hi. To my knowledge, it is not possible to edit records in a CSV file item right from within ArcGIS.com or the portal web app.  You have to upload the entire file again. 

It is possible to upload your CSV and create a layer out of it. Then, you could use the search appearance as described here to populate the list from your new layer. Details about the search appearance here: https://community.esri.com/t5/arcgis-survey123-blog/dynamic-choice-lists-using-search-appearance/ba-... 

Once you have the layer created, you can edit existing records. Deleting or adding new ones can be more challenging. May be a question in the ArcGIS Enterprise or ArcGIS Online Community groups will show some light on your options.

Back to editing the CSV files, you can also edit them programmatically. A scheduled notebook for example could help you more easily edit the contents. See details here:  https://developers.arcgis.com/survey123/guide/update-csv-item/   While it may take a bit of effort to create the initial notebook, once you have it, I think it would be a pretty nice way to update the files. You make the edits locally on a CSV file (in excel for example), and then you run the script to update the CSV item.

DougBrowning
MVP Esteemed Contributor

But then it will not work offline, correct?  Unless it can be linked content?

0 Kudos
GregKeith
Frequent Contributor

@DougBrowning It is linked content (sorry if you were replying to @IsmaelChivite )

0 Kudos
GregKeith
Frequent Contributor

Thanks. Scripting would be helpful, but would still like to be able to edit in Portal like a feature layer. Over to the Ideas page!

0 Kudos