Dear all,
I am writing because of an issue with layers that are imported from files. If I want to update the layer from a new version of the file that contains a new column that I want to add to the dataset, I don't see any way to do so instead of deleting the whole layer and creating it new by uploading the new version of the file.
Here are the steps to reproduce the issue:
Expected behavior:
You see all columns, including the new "testcolumn" with the dummy data.
Actual behavior:
You see only those columns that existed before, there is no "testcolumn".
I also tried to add a column with the corresponding name in the data tab before overwriting the entire feature layer, but that didn't help. I also tried adding a column with the corresponding name and not overwriting the entire layer but just "updating", also without success.
I can understand that column renames might be hard to handle, but I would a simple addition expect to work.
I am not sure, but I think with csv files instead of Excel it was possible to add columns.
I would be glad to receive a solution for this, because the current workflow forces me to delete the whole feature layer and start from the beginning what makes me loose all layer settings that I applied to the map earlier (colors, icons etc.)
All help is much appreciated, thank you in advance!
Hi @JanK ,
When you overwrite the feature layer, we are essentially deleting and recreating the service for you based on the file you upload. Overwrite does not account for schema changes and we don't recommend using it for the workflow you describe above (adding new fields).
I also tried adding a column with the corresponding name and not overwriting the entire layer but just "updating", also without success.
This would be the workflow I would recommend. But you will need to make sure that the new field (e.g., testcolumn) is added to the existing hosted feature layer (the "destination") AND the uploaded .xslx file (the "source") before using the Update Data workflow.
The workflow should look something like:
Here are some other resources that may be helpful:
Best,
Taylor