Pulling reference data from external database


I'm relatively new to ODK, but see it as a much better alternative to the current system of using excel forms, especially for sharing of data.
I currently encounter a problem that was very easy to tackle within excel userform. When I for example want to ask the participant for the place of his office I ask for province and district. Each district has a unique tracing number. The province and district are selected with cascading select, but after the selection of the district is done, I want the tracing number to be displayed next to it. Not for manipulation, but for the information of the participant to verify the number that he has written down. Of course I could just put the number as selection, but I want to use this idea in other instances as well.
So the question is, if there is a possibility to pull date from an external database that somehow represents the lookup function of excel, whenever a selection is made to display the reference value in the same row and different column in a box next to it.

During my search I did not find a discussion on that, but hope that anyone can help me out.

Thank you and best regards,

Hi @SiegmarS! You can pull data from a CSV. See http://xlsform.org/en/#how-to-pull-data-from-csv for more. This assumes the number being used as the underlying value.

If the number is used as the underling value, then you can show it back to the user by using ${variableName} as part of any label or hint. You can see examples of this at https://docs.opendatakit.org/form-logic/#form-logic-building-blocks

A post was split to a new topic: Link calculation to other forms

Dear Yaw. Thank you for the comprehensive answer.
In the example you referred to, the variable was shown after replying to one of the questions. But I assume from your answer, that I can pull any variable from a csv, tat I imported earlier.

Yup, you are correct.

When you get a chance, please introduce yourself here. I'd also encourage you to add a real picture as your avatar because it helps build community!