When creating a survey on Collect, it is useful (and, most of the times, required) to add a unique identifier (key) for your records. This key is generally a 'number' attribute. However, reading the manual it looks like it's not possible to set this field as an AUTO INCREMENT field (like one would do in a typical database like MySQL). How can I set my key field to be managed as an AUTO INCREMENT field (value generated automatically by adding 1 to the corresponding value in the previous record) and avoid to input manually a new value each time I add a record? This would save a lot of time and also prevent errors in my records (it could happen to input the same value more than once, especially if you add lots of records in a short time and/or you're in the field using Collect Mobile). Thanks in advance to anyone who could point me to the right direction. |
Hi, |
Good question. In addition can you clarify: if this field (UUID+Date) is set as a calculated field and Not Shown In Entry Form, will the date recalculate each time the attribute is opened? For example if it is opened the following day? |
Sure, if it is a calculated attribute it will always be recalculated. |
Thank you guys for your assistance. I will try to implement your solution. I think it could be a nice workaround. The only difference with what I wanted to do is that an auto-generated 'number' attribute would also help you in counting how many observations you have made. How can I do this without an AUTO INCREMENT field? Thanks again. Luca |
Hi Luca, |