Is this a fatal reason for a survey not to publish?
Succinctly, I read some project numbers from a .csv,
start a repeat where users enter new project data and expect to get new numbers,
I run a count in a counter field,
Then calculate the new project numbers by adding the last project number read outside the repeat plus the value in the counter.
It works, but it will not publish.
Please advise, TIA
Update: I saw in the log that there was a problem with the newly added counter field not being present in the feature service, so I deleted the feature service and the updated survey did publish.
Now I'm getting a different kind of problem, and that is when I close the survey everything resets and the only reference I am left with is the project values in the .csv.
Is there a way to read the last record in the feature service to use as a reference?
Or is there a way to read the last record from the Sent section of the survey page in Survey123 for ArcGIS from the survey's XLSForm?
Do you see an error message, or have a screenshot or video of the issue you are seeing? It sounds as though the survey info file of the item that is on your computer is now out of sync with the item online which you deleted? How did you do the deletion? Are you using AGO or Portal?
I think it would be better to start again, by creating a new survey and new FS from the existing xlsx file and that way all the files and links between Form item and Feature service will be correct.
If you want to share your xlsx form we can take a closer look and ensure it can be published without error for new FS.
Sorry for morphing my question. At first, the survey wouldn't publish because of a new field I added. Killing the FS solved it.
The second dilemma is more of a design issue. I read the last project numbers from a .csv and build up on it.
Problem is when the survey is closed, the sequence is broken. And I'm back to whatever is in the original source .csv.
A possible solution would be writing the last record to the .csv--this would require manual work or a script, and I don't know how to read the FS with a script yet. Another would be reading the last record on the FS from the XSLForm and build up on it, but I don't know that there is a function that will do that.
Currently dynamic lists or reading a list from feature service or other source is not supported. There is no way to do this out of the box from the xlsx file.