How to validate totals against sum of sub categories in Kobo?

Hello Team, I wanted to validate a total value in Kobo form builder. For example, I have total hospital admissions which should be equal to sum of hospital admission sub categories listed by causes of admission. I tried to put in a validation which should flag an error when the sum of the categories becomes greater than the recorded total. However, the validation doesn’t seem to work in the preview. I would appreciate your support on this.

Welcome to the community, @bizaheran! Could you share with the community your dummy questions so that the community would be able to have a look at it?

Thank you @Kal_Lam. I highlighted the questions in the attached form. Eg. the sum of admissions from sub categories(rows 11-18) should be equal to the total number of admissions recorded(row 8). I wanted to add validation that flags error when the data in the sub categories is greater than total. SLL_Form.xlsx (12.3 KB)

@bizaheran, you could do it as outlined in the image shared below:

In the survey tab of your xlsform:

Data entry screen as seen in Enekto: when the number tries to exceed

Data entry screen as seen in Enekto: when the number matches

Reference xlsform:

SLL_Form.xlsx (14.6 KB)

1 Like

Perfect! Thank you so much for your prompt support.