Getting a unique number that will always refer to one form entry?

Hi all –

We are being asked to export our form data so that it is in a format that
fits the format that a partner organization has been using.

Designing a custom export seems to work fine for the various fields that
they need, and the order they want them.

But one thing they ask for is, far at the left, a “Number” field, one for
each row in the table.

1-- I know that CommCare outputs a “row.number” field at its far left.
However, I am not sure how that row number works. If I do a given data form
export today, and one particular row is listed as row number 105 in that
export, can I be confident that, if I do another export of that form’s data
two months from now, that the very same form that had had its data in row
105 the first time will again be numbered as 105 in that subsequent export?
Or, rather, does that numbering restart and get counted differently when
an export is run later – (and even someday potentially from a different
"custom export" design?)

2-- If the answer to item 1 is no, I can’t look to row 105 as always
pointing to the same form record… then do you recommend some way of
placing a number into a given custom export, so I do get a number for that
"Number" field that they want, and that number will remain the same for a
given record? For example… uhh… somehow having it be the
YYYYMMDDHHMMSS taken from the server received-by… … that would
basically be unique as unlikely two forms submitted in the same exact
second. BUT, any more graceful way of getting a unique number?

THANKS!
Eric

P.S. … from looking at my various different data exports, seems clear
that the answer to (1) is no, I can’t depend on row.number. the numbers
don’t remain pointing to the same records. So… Any thoughts on question
(2)?

Hey Eric,

The answer to 1 is unfortunately no.

For 2 - can you use the form ID? This is a GUID that is globally unique for
the form and will never change.

thanks,
Cory

··· On Mon, Sep 28, 2015 at 10:12 PM, Eric Stephan wrote:

P.S. … from looking at my various different data exports, seems clear
that the answer to (1) is no, I can’t depend on row.number. the numbers
don’t remain pointing to the same records. So… Any thoughts on question
(2)?


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.