Populating a form with data from a database

Hi Kal,

I was hoping you can help me. Is it possible to populate certain fields in a deployed form based on a SQL query? For example, we have a user (with a unique ID) complete one form, and then another form is presented that is pre-filled with some of his information, based on a SQL query run on a DB on his ID?

We currently run an external PostgreSQL database connected to Kobo through OpenFn.

Thank you!


Do you mean you wish to pull the value to a form while filling a form that was entered into a submission filled and submitted to the server previously?

Morning Kal!

That is one possibility, but also pre-populating a form upon it’s first open.

Basically we need some functionality to populate a certain form (either already submitted or in progress) based on a SQL query from an external DB. Mostly because we have an individual filling out multiple forms and we don’t want them to have to provide information more than once.

Thanks so much!



What do you mean with “in progress” here. Only submotted forms reach a server.
Is this parallel work of the same emumerator on the same device.
What are you using? ODK or KoBoCollect or Enketo? Which server?