Creating id in xlsform

how can I create an id for data or records in xlsform.

I do not understand the question.

Look at the sample form and XLSForm documentation to get an understanding
of the tools and how you use them.

https://opendatakit.org/use/xlsform/

··· On Wed, May 13, 2015 at 7:42 AM, Mercy Adams wrote:

how can I create an id for data or records in xlsform.

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

for example: I want to create a xlsform containing student record and I
want each student to have an id (identifier) that is unique and which will
be created by me.
how do I do this?

··· > >

Hello Mercy,

Did you think of using concat(val1,val2,...) to generate a concatenate of more than one variable as your student ID can be Faculty, Degree, DOB and so on to generate a Unique identifier or use the uuid() function to generate a random key for you (I won't recommend this as you won't have control on what is generated)

Cheers

Jules R.

··· On Wednesday, May 13, 2015 at 4:42:06 PM UTC+2, Mercy Adams wrote: > how can I create an id for data or records in xlsform. >

You will want to use a calculate expression to construct the student id
from other input. The functions that you can use to construct that id are
here: https://opendatakit.org/help/form-design/binding/

e.g., concat() will probably be useful.

See the sample XLSForm for how to define a calculated field.

··· On Fri, May 15, 2015 at 7:56 AM, Mercy Adams wrote:

for example: I want to create a xlsform containing student record and I
want each student to have an id (identifier) that is unique and which will
be created by me.
how do I do this?

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


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

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

do you have another approach to answer the question?

thanks, I will work on it ..

I visited the link above and I try using the concat function but after

uploading the xlsform, the id did not generate itself automatically.

can you show me how to use the concat function .
I used this and am not sure if it is correct. calcualate="concat(/data/staff_serial_num,'
with id: ', /data/age)"

··· > >> >

Hello there,

The concat function can be used anywhere, constraint, relevant and
calculation. based on your email it looks like you made a calculate type
variable which is totally fine but remember calculate variable are ready
only therefore has to be always used together with other variables like
tex, integer and more to read their content.

Below is the very basic yet useful example of concat and lengt functions

type name label constraint calculation read_only required  integer

ID_V01 What is you random ID? .>=1001 and .<=1999 1 text ID_V02 What are
your names initials? string-length(.)>=2 and string-length(.)<=3 1
calculate ID_V03 concat('EID-',${ID_V01},'-',${ID_V02}) text
ID_V04 You
have successfully generated the new employee ID as: ${ID_V03}
concat('EID-',${ID_V01},'-',${ID_V02}) 1 1
hope you find it useful

Cheers

Jules R.

··· On Wed, Jun 10, 2015 at 2:28 PM, Mercy Adams wrote:

I visited the link above and I try using the concat function but after

uploading the xlsform, the id did not generate itself automatically.

can you show me how to use the concat function .
I used this and am not sure if it is correct. calcualate="concat(/data/staff_serial_num,'
with id: ', /data/age)"

--
--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/a0P-KR-cOl4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.