1. What is the issue? Please be detailed.
What could be causing Enketo to fail to load a entity form in Central, while it works in ODK Collect and other similar forms? How can we fix or restructure the logic so Enketo allows data cleaning for our partners?
We're having trouble editing submissions in ODK Central via Enketo. The form was designed to pull a beneficiary's name and ID using entity data (projectXYZ_beneficiaries). It works perfectly during data collection in the ODK Collect app, but fails in Central.
The form has a begin_repeat called part_list, where users select a participant. Inside that repeat, there's a select_one called search_name (autocomplete with search('projectXYZ_beneficiaries')), and a calculate that pulls the ID like this:
if(
pulldata('projectXYZ_beneficiaries', 'ID', 'name_beneficiary', ${search_name}) != '',
pulldata('projectXYZ_beneficiaries', 'ID', 'name_beneficiary', ${search_name}),
pulldata('projectXYZ_beneficiaries', 'ID', 'name_family', ${search_name})
)
Some entities use name_beneficiary (e.g. commercial farmers), others use name_family (e.g. smallholders), depending on how they were registered. The logic works in Collect.
The issue: when opening the submission in Central for editing, Enketo fails to load the form. After clicking "OK" on the error message, the form loads with no fields visible, making cleaning or editing impossible.
This also affects another form that uses similar logic, but strangely that one does allow edits; so it’s unclear what exactly is causing this.
2. What steps can we take to reproduce this issue?
Submit a form via ODK Collect, selecting a name via autocomplete (search_name) and allowing the ID to be pulled using the conditional logic.
Go to ODK Central → Submissions → Edit → try to open the form via Enketo.
Observe the error and empty screen after clicking "OK".
3. What have you tried to fix the issue?
We simplified and restructured the pulldata calculation to isolate errors.
We tested removing the conditional logic: this helped reduce issues but broke the logic we need (since name_family or name_beneficiary can be used depending on the entity).
We suspect that the problem may relate to the choice_filter on another select_multiple question filtering organizations, but we’re unsure how that’s interacting with Enketo.
4. Upload any forms or screenshots you can share publicly below.
FormLogicError: Could not evaluate: if("" != '', pulldata('projextXYZ_beneficiaries', 'ID', 'name_beneficiary', ../search_name ), "20241022M0a01an1995AG"), message: callNative() can't handle nodeset functions yet for pulldata()