Select to view content in your preferred language

Auto Increment ID Field

5226
11
Jump to solution
02-02-2022 11:52 AM
AmandaBeck
Regular Contributor

Hi there, 

I created a survey with Survey123, which I have connected to Integromat in a scenario for generating a report every time a survey is submitted, and at the same time, emails the submitter an attachment .pdf with an ID number on it. At first, I was using the ObjectID field as my ID identifier, but after further reading and running into my own issue of every time I tried to "test" my scenario, a new survey entry was submitted, therefore using ObjectID numbers which cannot be deleted. The problem is, once I get my scenario working properly, I need the ObjectID field to restart at 1,2,3 and so forth. Obviously, it is not possible to restart ObjectID's without restarting and recreating the survey (and all the other steps I've taken to get here), but I was hoping there would be another solution. 

I've read about auto incrementation, but I cannot figure out how to get it to work. The survey I created was authored in the web version of Survey123. 

I also had a thought of adding a field to my Survey123 table (not sure how to do that) and putting the auto incremented ID number in there, which could be calculated from a date/time field I currently have. But I'm not sure how to do that either, or if it is even possible. 

If anybody has any thoughts on this, it would be greatly appreciated! P.S. I have read through all the posts on Auto Incrementing with Survey123. Hopefully somebody has something new to say. 

Thanks in advance!

0 Kudos
11 Replies
MonikaSamorajska
Emerging Contributor

Hi @jcarlson

I have been trying to use the solution proposed by you for calculating "investigation number", however I receive null value once submitting a new entry.

Thank you for any suggestions!

Regards,

Monika

 

0 Kudos
jcarlson
MVP Esteemed Contributor

Monika,

In recent updates, Survey123 now has a method pulldata("@layer"...) that can accomplish this sort of thing without any complex JS functions. It's much easier to work with than the original solution to this post.

https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-laye...

- Josh Carlson
Kendall County GIS