Problem with auto number

dear members!
i want to add (auto number) to the first column of my xlsform, so, and it dos not work, integer type also not work there, so for (auto number) type question, what we select in (type) column of survey sheet?

Hi @Mansour,

Perhaps this post by @Nader https://forum.getodk.org/t/auto-unique-number/5523/12 can help you. Give it a try.

1 Like

thank you so much for the guidance, but i want to have 1.2.3.4 ........... as the start of each raw, there was not anything.

Please be sure to use the support template when you ask a question! It's there so that you provide enough information to get the help you need. Please describe what you are trying to accomplish. Where do you want these numbers?

1 Like

i my first column with auto number(1,2,3,4,5.........), meant, each raw(record) should have this number, for example, when I enter 200 records, my first record should have 1 and the last should have 200, and second,
I attached a from, it could not be converted, it say that there is mistake in raw25, I tried my best but I could not, and I don't know what is the problem there?[EPIForm.xlsx (11.7 KB)

thanks in advance for your help.

Hi @Mansour,

I don't know of any function in ODK Collect that allows to do that directly (Please see: https://forum.getodk.org/t/automatically-stored-order-number/5605) but you can do the following after the survey has been completed and downloaded in csv file:

  1. Order your line by completion datetime order (this means you must have such a meta column in your survey)
  2. Add a column for numbering
  3. Put 1 for fist row, 2 for second row then drag down to the end (Excel method) to generate the other numbers (3 to last row)

I hope this helps.

4 Likes

I would tend to add the numbering in Excel just like @Souirji_Abdelghani describes but another option is to use an external app such as the counter app described in the Incremental counter thread. This will allow you to get incremental values seamlessly from within a form.

3 Likes

Hi Mansour,

in first of all i want to tell you that if you are going to distribute your form to more than one device
you will get in the server from each device submission 1,2,3,4
in fact form implementation not support this auto number.

and about server side which not support either yet.

i suggest what @Souirji_Abdelghani for excel column numbering.

Best Regards

3 Likes

thank you every one for your help

1 Like

hi @Mansour, @LN, @Nader,

First thanks to @LN because I didn't know the existence of the ODK Counter tool. However, if the purpose is to get an overall continuous numbering of all the individual interviews in a survey, the argument above by @Nader remains valid and i would add that potential deletions may complicate further the situation.

As soon as I can, I'll study more in-depth the ODK Counter tool because it may be interesting after all.

3 Likes

Thank you for that clarification, you're absolutely correct @Souirji_Abdelghani -- the counter app only makes sense if there is only one person collecting data OR if the count is linked to some other information such as the enumerator username. This kind of counter functionality does not exist directly in Collect because the app is generally used in offline contexts with many different enumerators and timestamps can generally be used for sequencing. But using the external app is seamless for those who do need it!

3 Likes

Hi @Mansour, @LN, @Souirji_Abdelghani

thank you all of you.

by the way @LN i appreciate your mention about ODK Counter Tool.

you are right @Souirji_Abdelghani me too i will discover the ODK Counter Tool.

Best Regards