Collect v1.28.2 - error about two different forms with same formid and version and constraints not accepting valid values

I dont know if it is me alone - We have been doing A lot of Phone based data collection due to covid-19, but even before then we have been using ODK as our primary data collection tool for electronic data capture.
Now we are doing another survey in Nairobi, I just finished programming. However I have noted a few things with the latest ODK Collect v1.28.2,

  1. It is not allowing me to edit forms even if there are no duplicate form ID downloaded. See the screenshot of the error - previous versions have been okay.ODK Collect_v1.28.2

  2. Some constraints even if they are correctly specified, prevents one from moving forward, until you first swipe back then forward for it to accept. This has also happened before in one of the beta versions of previous ODK collect. Has anyone else experienced this?

Does anyone know what the issue is?

Neither of these look like known issues. For the first, what do you see when you go to delete saved form? I don’t think we touched that behavior. If you can, it would be helpful if you could install v1.27 from APK and see whether you get the same behavior or not.

For the second, could you please share a form definition that leads to the issue?

2 Likes

@dmwanga I have a fix for the issue at Repeats and calculations inside nested repeats behaving differently in `ODK 1.27.3 vs 1.28.2` which results in the behavior you saw with needing to swipe back to get calculations to get a value. I was able to reproduce what you experienced but only in repeats. You mentioned in the other thread that your form may not involve repeats so it would help a lot to see it. If your form definition is sensitive, feel free to direct message it to me and I will delete it after troubleshooting.

Test_Collect_v1.28.2.xls (33.5 KB) Test_Collect_v1.xml (1.8 KB)

Thank you so much, @dmwanga. Can you please give me a set of steps to reproduce the issue? I have tried starting with valid values (6, 20) and that allows me to swipe forward. I have tried starting with invalid values (-1, -1) and that blocks me until I use a valid value. I have tried a mix and that also works as expected.

Okay thanks @LN, let me check. A few of our our research assistants raised this and I was able to reproduce it. Let me send you another part of the form that had multiple complaints. Involving the regex() function

Try this one Test_Collect_v1.xml (2.6 KB) Test_Collect_v1.28.2.xls (35 KB)

Look at the field on "enter phone number you used to reach the participant."

@dmwanga are you able to reproduce unexpected behavior with this minimal form? I have tried everything I can think of and am always getting the behavior I expect. What exactly are your assistants reporting? For example, "they put in a 10-digit value for the phone number, then a 10-digit value for the confirmation, and they get the constraint warning."

Are you sure this captures the full structure of the form? Repeats and groups in particular have an effect on evaluation so your test form should match that structure. Sometimes expressions are related in surprising ways so there might be problems that can only be reproduced in the context of a full form.

I cant share the entire form because of sensitivity of the information. Let me try to reproduce it and let you know. Perhaps it was a specific case.

1 Like

@LN See screenshot of the error from the full form. I have reproduced it. I have to swipe back one step then forward for it to move. That is what our team has been experiencing. Am sorry I cant share the entire form for sensitivity of the information as earlier noted.

Thanks team for your efforts in trying to resolve this. Yes I agree it may be unique to this particular case but I think might be worth investigating.

Thanks,
Dan

We do really want to fix this but there's no way we can reproduce it without the source form. Are there choices that are sensitive? Maybe you could remove those? Again, you can send the form just to me and I will do a check and then delete it.

Alternately, you can try to share as much as possible about what else is going on in the form. Any groups, repeats, etc. How do you author and convert your form to XML? What is the sequence of actions before getting to this question. Any repeats? Any field lists? Any relevance expressions?

Can you reproduce it systematically or does it happen sometimes? If it's not always, can you notice any pattern? Are you using powerful devices or perhaps older, less powerful ones?

I think I can reproduce by going to a phone number question, giving an invalid answer, saving and exiting the from, reopening the form for edit, correcting the invalid answer, and then I get the constraint error message until I swipe back and forward again. Does that seem like it could be a workflow your data collectors go through? I'm of course looking into fixing this but it'd be helpful to know whether it's likely to be what you've experienced. For example, if your data collectors never re-open forms for edit, there's probably something else going on (possibly related).

1 Like

Yes @LN That is one of the issues. But today when I was reproducing it, I did not reopen the form for edit. I entered the correct number but would not allow me to move on until I swipe back and forward. But I think it is possibly related issue. I guess fixing what you were able to reproduce might fix the one we experienced. Let us know once that is fixed then I can test it with our form to see if it is resolved. Thanks @LN

1 Like

Thanks again for your report, @dmwanga. We have released v1.28.3 which should fix the constraint issue you experienced when editing an existing filled form.

It is possible the same issue could result in bad behavior when a blank form was filled but I don't immediately see how that would be possible. If you see bad behavior again, the more context you can provide, the more likely we can fix it. We will need more about your scenario to dig into the formid/version issue you experienced. I asked some questions above.

We really appreciate you being part of the beta program and the sooner you can let us know of unexpected behavior, the better we can make Collect for everyone!

1 Like

6 posts were split to a new topic: Error about two different forms with same formid and version

A post was split to a new topic: Unable to finalize and send a form