Select1 allowed values

hi,

I've noticed blank spaces are not allowed within the select1 node.
I'm experiencing some issues when editing a form, and if a value has an
empty space, the previously saved value is not selected. E.g:

an xml with this node <m_atlantico>Baranoa</m_atlantico> gives me no
troubles,

but if the node contains: <m_atlantico>Campo de la Cruz</m_atlantico>

The value is not selected (remains empty) and, unless you manually set the
value again, form validation fails at validateAnswers method from the
SaveToDiskTask class.

Of course I can replace those values for some other values, but I was
wondering whether is this a bug, or just a limitation from javarosa, who
seems to be the responsible of loading the form?

thanks in advance,

pau.

Pau,

If my memory is correct the reason spaces are not allowed in value
field is because when you use multi-select widgets the concatenated
multiple answers are separated by a space in JavaRosa. Therefore the
parser would be unable to determine the values if spaces existed. Note
the label value can have spaces only the value cannot and the user
doesn't see the value in collect.

Hope this helps explain things,
Waylon

··· On Tue, Jun 19, 2012 at 5:06 AM, Pau Varela wrote: > hi, > > I've noticed blank spaces are not allowed within the select1 node. > I'm experiencing some issues when editing a form, and if a value has an > empty space, the previously saved value is not selected. E.g: > > an xml with this node Baranoa gives me no > troubles, > > but if the node contains: Campo de la Cruz > > The value is not selected (remains empty) and, unless you manually set the > value again, form validation fails at validateAnswers method from the > SaveToDiskTask class. > > Of course I can replace those values for some other values, but I was > wondering whether is this a bug, or just a limitation from javarosa, who > seems to be the responsible of loading the form? > > thanks in advance, > > pau. > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en

Oh, I see.

thanks for the explanation, Waylon. At least now I'm sure it's not possible
to save blank spaces within a . As for the reasons, it always
surprised me the multi-select widgets are space separated, but I guess
whatever character you choose, there will be some one like me complaining
about it :wink:

Main problem for me is I'm keeping a list of village names with a few blank
spaces (e.g: San Francisco). Since I can't store those names, I'll have to
figure out how to map ids with the real name when reading the xml..
something absolutely feasible, but I wanted to be sure about the
limitation...

Next time I'll vote for a comma instead of a blank space though...

thanks again and best regards,

pau.

··· 2012/6/19 W. Brunette

Pau,

If my memory is correct the reason spaces are not allowed in value
field is because when you use multi-select widgets the concatenated
multiple answers are separated by a space in JavaRosa. Therefore the
parser would be unable to determine the values if spaces existed. Note
the label value can have spaces only the value cannot and the user
doesn't see the value in collect.

Hope this helps explain things,
Waylon

On Tue, Jun 19, 2012 at 5:06 AM, Pau Varela pau.varela@gmail.com wrote:

hi,

I've noticed blank spaces are not allowed within the select1
node.
I'm experiencing some issues when editing a form, and if a value has an
empty space, the previously saved value is not selected. E.g:

an xml with this node <m_atlantico>Baranoa</m_atlantico> gives me no
troubles,

but if the node contains: <m_atlantico>Campo de la Cruz</m_atlantico>

The value is not selected (remains empty) and, unless you manually set
the
value again, form validation fails at validateAnswers method from the
SaveToDiskTask class.

Of course I can replace those values for some other values, but I was
wondering whether is this a bug, or just a limitation from javarosa, who
seems to be the responsible of loading the form?

thanks in advance,

pau.

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

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