[ODK Developers] Re: sanity check error when trying to edit saved form

Hi Chris,
This is a bug in XLSForm that was introduced in a recent merge. I'll have
some time to fix it tomorrow. For now, I think all you need to do is remove
the orx:meta tag and everything inside it. Sorry for the trouble this has
caused you.
Regards,
-Nathan

··· On Thu, Feb 14, 2013 at 4:05 PM, wrote:

On Wednesday, February 13, 2013 5:49:40 PM UTC-8, co...@rand.org wrote:

Hi All:

I have form with several banks of items that the PI has decided are too
long. The solution is to randomly select a couple of items from the banks
of items each time the form is accessed. So, for instance, we ask 2 random
items out of the first bank of 6 items. Later we ask randomly 2 of a bank
of 7 and then 4 out of a bank of 15. Thanks to help from Mitch about 10
days ago I was able to come up w/ an algorithm that does the random
selection just fine. But, if I save the form and then return to Edit it, I
get the error message "sanity check failed." I've seen on the ODK
Community pages that the sanity check error usually indicated a mis-match
between the current XFORM and the saved data. That is clearly not the
problem here as there is just the one form and the error occurs even if you
go right back into the saved form.

I have attached a very minimal version of my form that demonstrates the
problem. In my demo I generate just one random number in the range 1-6.
The 6 items then have a 'relevant' statement testing against the generated
random number.

My original thought was that when I re-accessed the form a new random
number was generated and then as a result there is data in an item that is
not relevant. I can't figure out how to do the randomization only once and
I'm not sure this is really the problem. You'd think that occasionally I'd
generate the correct number and pass the sanity check, but that never
happens.

I'm using a Samsung Galaxy Player, 4.2 w/ 8 GB of memory; Android
Version 2.3.6; running ODK Collect 1.2.2 (1023).

Thanks in advance for any thoughts you may have.

Chris

Thank you for your response. Between my ver 2 and ver 3 I switched to
manually editing my xml - but it is clear that the problem you identified
was introduced w/ my earlier XLSForm. I've created and attached an .xls
file that matches my demo and creates the same problem when submitted.

I'm perfectly happy to edit the xml file, but it would be trial and error
for me.

Best,
Chris

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

The orx:meta tag bug has now been fixed.
-Nathan