Assistance Needed with Household Registration Form

Dear all
I’m reaching out because I’m feeling a bit stuck with the household registration form for the Community Health Worker's project. I put a lot of effort into creating a form that could pull data from media files to pre-populate the fields, which would save a lot of time.
Everything seemed to go well – I uploaded both the form and media files to the ODK server successfully. However, when I tried to preview the form, I ran into an issue.

I’ve attached both the form and media file in case you can take a look and see if you spot the problem. Any help you could offer would be greatly appreciated!

CHW_Catchment_Areas.csv (10.6 KB)
new_household_registration.xlsx (580.4 KB)

Dear all,
A significant effort has been made for which the preview can now load but the form is not pulling data using the pulldata command. Please find the new updated form.
new_household_registration.xlsx (580.5 KB)

You have a empty row at the top of the CSV, you have to delte that.
Also, you're using CHW_Code_key in the pulldata but your column is called chw_code in the CSV.
new_household_registrationv2.xlsx (452.8 KB)

Hi nmambre,

Thanks again for the previous solution, it really helped! I'm now testing the household registration form on my tablet and came across a new challenge.

Ideally, the form should calculate the age from the date of birth and then automatically select the appropriate age range. Would you be able to assist me with setting this up?

Thanks in advance,

There are other questions here on the forum about age calculation

This one give some insights

1 Like

Hi nmambre,

Thanks again for your earlier support! It was instrumental in getting me this far.

I'm currently working on the age calculation for the household registration form. I tried the formula
round(decimal-date-time(today()) - decimal-date-time(${date_of_birth})),

but it seems to provide the age in days, which is accurate for babies under one year old, but not for older individuals.

I wonder if there's a better way to represent the age calculation that would account for both scenarios - calculating age in days for babies under one and years for everyone else. Perhaps there's a way to incorporate an "if" statement or another function?

Any advice you could offer would be greatly appreciated.


I think I once saw something similar in a past post here, or maybe in the documentation. Check the different threads in the search I gave you to see if you can find something there. But I guess an if statement could be useful.

Thank you very much nmambre and this was my solution to the age problem:
Age Solution.xlsx (9.2 KB)

1 Like