A monthly report is about a site. Rather than typing the site's name, which no two people spell alike, the report chooses the site from the register.
Add the question
- Add a single choice question, such as "Which site is this report for?".
- Under Where the answers come from, choose The records of and the register.
The answers are the register's records, each shown by its label. The report stores the record itself, by its id, so when a site is renamed every report about it shows the new name and no link breaks.
The list is read from the register each time the questionnaire is opened, in the reach of the seat that opens it. A partner seat is offered the shared registers whole and its own partner's records of any other register.
Narrow the list by an earlier answer
Ask the county first, then filter the sites by it: set the site question's choice filter to the county question and the register's own county question. A ward, then a site, works the same way.
Read a field of the chosen record
Write ${site}.county to read the chosen site's answer to its county question, in a calculation, a rule, a condition for showing a question, or an indicator. For example, a rule on the number of people served might be . <= ${site}.beds * 30. The value is read from the register as it stands when the report is entered and checked again on the server when it arrives.
On phones
The field app and data entry carry the register's records in the questionnaire they download, and the app fetches them again after every sync, so a site added this morning reaches a phone at its next sync.
ODK Collect and KoboCollect receive the register as a file beside the form, with only the records the signed-in seat may read. When a record is added or renamed the file changes, and Collect fetches it again the next time it updates its forms. ${site}.county is written as the pulldata() Collect understands.
A register's records can run to thousands, so a linked question is not offered on USSD, text messages or voice calls, which read a list aloud or in short menus.