What happens with duplicate variable names?

A coder who created a survey used a variable name "cheese" which was prompted by text and saved a string value.

Two questions later, the coder used the same variable name "cheese" which was prompted by different text and saved an integer value.

Would the integer value overwrite the string value, or would there be two "cheese" values?

I'm looking at data with two columns that have the same name "cheese" and the first is an integer and the second is blank, so i'm assuming that's what happened, but wanted to check.

Thanks!
Tim

For readability and maintainability, this is simply a crazy thing to do.

The answer depends upon the form design tool and the server you are using
to aggregate the results.

On ODK Aggregate, the group name qualifies the field name, so you can have
a 'patient' group with a 'name' field, and a 'practitioner' group with a
'name' field, and ODK Aggregate maintains them as separate fields.

ODK Collect works in a similar way.

However, XLSForm works only on the field names, so ${name} is ill-defined
on such a form (I don't know whether it gives an error or which one it
picks to use).

In general, it should not be possible to have two 'cheese' field names
within the same group.

Mitch

ยทยทยท On Thu, Dec 5, 2013 at 2:34 PM, Tim wrote:

A coder who created a survey used a variable name "cheese" which was
prompted by text and saved a string value.

Two questions later, the coder used the same variable name "cheese" which
was prompted by different text and saved an integer value.

Would the integer value overwrite the string value, or would there be two
"cheese" values?

I'm looking at data with two columns that have the same name "cheese" and
the first is an integer and the second is blank, so i'm assuming that's
what happened, but wanted to check.

Thanks!
Tim

--

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/groups/opt_out.

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