Ensure that a re-entered number matches the original number

TALLY Three Answer To ensure that a re-entered number matches the original number in an ODK XLSForm, using constraints similar.

1.1For example Total Number of House = 33
Then
2.1 Total Number of Poor house hold = 20
2.2 Total Number of Marginal house hold = 5
2.3 Total Number of Rich house hold = 10
2.4 Total = 35 (total will be auto count)

As 1.1 is not matching with 2.4 so how we can make validate

Hi Joydeep,
I assume 1.1 is stored as integer is variable q1.1
First calculate the total no. of houses in a calculate variable Th.
Then add a note nX before the note you create for displaying total (Th) in 2.4.
Make nX mandatory and in its relevance column put this expression- ${q1.1}!=${Th}
This will make sure that form doesn't validate if 1.1 is not matching with 2.4.

2 Likes

Its Not working please provide a excel example it will be helpful

Can you share your XLSForm Excel?

1 Like

Village Profile (1).xlsx (17.5 KB)

Please only make nX mandatory.