Hey @dast & @Joshua_Ayanlakin ! 
Looks like you’ve run into a tricky little bug in ODK Central (yep, this one existed in ODK Aggregate as well). It’s one of those sneaky issues that’s really hard to catch - BUT, I happen to know the fix! I’ll first explain what’s happening and then share the solution.
The Explanation
A few years ago, when I was just getting started with ODK, I spent a lot of time reading the docs, testing things out, and basically trying (and failing) over and over again because that's the best way to learn, right? (For the record, I failed 300+ times while learning about ODK and 10,000+ times while learning to code in general!
)
During my early ODK experiments, I ran into quite a few weird bugs - which I ignored as I managed to fix them with quick workarounds or tweaks. One of those bugs popped up when I was exploring the pulldata() and instance() functions.
Now, for many users - these two functions seem to do the same thing: looking up and pulling data from an external file (like a .csv). At first, I was confused too. I asked myself - "If both functions serve the same purpose, then why have two?". My guess was that the developers designed pulldata() to be the simple, intuitive option, while instance() was meant for more advanced filtering and use cases. So, naturally, I decided to experiment with both. That’s when I stumbled upon the very same issue you’re facing now!
What did I find?..
- When you use pulldata() to lookup and fetch data from an external file, it automatically loads the .csv onto the device.
- But when you use instance(), it does NOT automatically load the .csv - which is totally unexpected behavior! Without loading the file, the form simply won’t work.
So, if you're using instance(), you have to manually force the file to load.
Now, here’s the connection to your issue:
- The "update_if" and "create_if" fields in the entities sheet behave just like the instance() function in this case - which means you’ll need to manually trigger ODK to recognize the external file / entity list. But how? Check the next section!
The Solution
To make this work,
Step 1: Add the following row at the top of your survey sheet:
type |
name |
label |
choice_filter |
relevant |
select_one_from_file EntityListNameHere.csv |
anything_here |
anything_here |
false() |
false() |
Just replace "EntityListNameHere" with the exact name of your entity in the entities sheet (under list_name).
Step 2: Manually create the entity list in ODK Central with the same name. No need to add any properties - just creating the entity list will do!
Step 3: Since we’re not using select_one_from_file to get input from the user to update the specific entity record (because if we were, we wouldn’t have run into this issue in the first place
), you’ll need to use something else - maybe a text field, a fixed calculate field, or any other method that fits your form’s logic (like maybe you wish data collectors to scan the barcode for record selection rather than selecting from a list). Just make sure you’re capturing the data in a way that allows you to update the entity record using a specific entity_id.
Step 4: Upload the draft, then publish! Once you do that, your form should start working!
Final Note
@dast - This is why @LN ’s example works. It includes select_one_from_file participants.csv, where "participants" happens to be the dataset/entity list name. Try changing it to "select_one_from_file abcd.csv", and you’ll see the same error pop up again!
@Joshua_Ayanlakin - While this fix will solve your entity-related issue above, I have to say… I’d recommend making a few changes and check the logic in the form for better usability. You might need to add uuid() under the entity_id field and introduce a label field, develop further logic, etc.
Hope this helps! Wishing you a great day! 