RE: The calculated field does not work in my form as well as the creation of a unique number for each household

Hello Kal_lam,

I just have a small concern that prevents me from advancing in my form.
I want the sum of the female children + the sum of the male children to be less than or equal to the total number of people in the household so that this is consistent.
In other words, the total number of children cannot be greater than the number of people in the household.
How to ensure that this constraint is respected and that if it should happen, a message may be displayed to the interviewer to report the inconsistency and force him to enter values between 0 and the total number people in the household. I am attaching a copy of the file so that you can help me resolve this difficulty.
thank you

TestCalculation.xlsx (9.8 KB)

Hello Kal_lam,

I just have a little problem that prevents me from advancing in my form.
I want the sum of the girls + the sum of the boys to be less than or equal to the total number of people in the household for this to be consistent.
In other words, the total number of children cannot be greater than the number of people in the household.
How to ensure that this constraint is respected and that if this should happen, a message could be displayed to the interviewer to report the inconsistency and force him to enter values between 0 and the total number of people in the housework. I am attaching a copy of the file so that you can help me resolve this issue.
Thank youTestCalculation.xlsx (9.8 KB)

Hi @esy_cari2020,

You could create the same as shown in the image below:

In the survey tab of your xlsform:

In the choices tab of your xlsform:
Image 2

Data entry screen as seen in Enketo: With a wrong entry, the form is not allowed for submission

Data entry screen as seen in Enketo: With a correct entry, the form is not allowed for submission

Reference xlsform:
TestCalculation.xlsx (10.9 KB)

Have a great day!

Hello Kal_lam,
Thanks for the help. Indeed it works from a coherence point of view.
But the alert window indicating that there is an error or an anomaly is not displayed. Also, the footnote which specifies to correct the error is in red in the example that you had sent me. However, with me this is also not displayed. How to correct this part which is very important for the arrest of the investigator when there is a data entry error?
To sum up :
When I test the file you have corrected for me, it looks like under image 1 (img1)

I wish I had it in the form of the image that you attached to the file on the forum (img2), in order to draw the investigator’s attention to the error.
How to proceed ?
I attach the two images so you can tell the difference.
I am Ivorian and I speak French. lol
Thank youExample to take into account and modified.xlsx (9.8 KB)
Thank youimg_French Example

1 Like

Hi,
The second message will only come up if you click validate. I also slightly amended your form as follows

See attached form TestCalculation.xlsx (11.2 KB)

Once you finish the entry and you try proceeding by clicking validate it will alert you.

Stephane

1 Like