Drop-down list from another table in odk-x or Mysql table

Hi everyone,

1. What is the problem? Be very detailed.
I am trying to get this data (Registered Hospitals) dynamically in my main form as drop down values. I want to use reference the dropdown values from another table or MySQL table instead of the csv file.
Should I create a separate table for Registered Hospitals? How can I link the table into my main form as drop down values?

2. What app or server are you using and on what device and operating system? Include version numbers.
I setup ODK-X Sync Endpoint with AWS

Thank you.

Hi @Quoda!

If you want to use another table instead of the csv file, you will need to create that other separate table for hospitals just like any other table/form.

Once you do that, you can then used the linked_table functionality described on this page: https://docs.odk-x.org/xlsx-converter-using/#linked-tables
to make a query from your main form that refers to the hospitals form - a bit like a query for csvs but for a table

You can then use a select_one prompt in your main table/form to, for example, select a hospital that is in the hospital where a person is visiting. There is an example of this for a household survey where you enter data in a linked table on each member, and then go back to the household form to use that list to answer a question on the household head: https://docs.odk-x.org/xlsx-converter-using/#id12

1 Like

Thanks for the support!