Apologies if this is really easy.
I'm doing a survey and each individual has a unique ID
- I would like the user to enter the ID twice and for it to check that the second entry matches the first to reduce errors
Is this possible?
e.g participantid = participantid2
Thanks in advance,
Michael
You can add a note (type) with relevant condition like: ${q1} != ${q2}
···
On Monday, October 27, 2014 7:11:27 PM UTC+7, michaeled...@gmail.com wrote:
> Apologies if this is really easy.
>
> I'm doing a survey and each individual has a unique ID
>
> - I would like the user to enter the ID twice and for it to check that the second entry matches the first to reduce errors
>
> Is this possible?
>
> e.g participantid = participantid2
>
> Thanks in advance,
>
> Michael
Hi Michael,
type name constraint integer participantid
integer confirmation .=${participantid}
Regards
Koassi
···
Le lundi 27 octobre 2014 12:11:27 UTC, michaeled...@gmail.com a écrit :
>
> Apologies if this is really easy.
>
> I'm doing a survey and each individual has a unique ID
>
> - I would like the user to enter the ID twice and for it to check that the
> second entry matches the first to reduce errors
>
> Is this possible?
>
> e.g participantid = participantid2
>
> Thanks in advance,
>
> Michael
>
>
Hello,
Although this thread is old, the issue remains highly relevant for forms that require critical data accuracy—such as entering unique participant IDs, phone numbers, or email addresses. Simply checking that two fields match using a constraint is not sufficient: if the first field is edited after the second is filled, the validation does not re-trigger, and the mismatch may go unnoticed. A robust solution involves not only validating the match but also using relevant logic or auxiliary fields to clear or force re-entry of both values in case of discrepancy. This behavior can be implemented in XLSForm, but it requires careful design. It would be valuable for the ODK team to publish an official pattern or best-practice guidance for implementing double entry verification in cases like these.
Thanks!