Hello, @Sadiq_Khoja want to automate a database of some people, this file is in .csv. What I want to make sure is that when you select the identification number automatically, the data appears to view or if it is the case edit in the fields: Nombre_propietario Apellidos_propietario tipo_documento Genero_productor Nombre_finca Departamento_predio Municipio_predio Vereda Corregimiento fecha_ingreso_programa
These rows are highlighted in yellow in the survey tab, it is the first time I use this option in odk if you can guide me I would appreciate it. id.csv (2.0 MB) cacao_aci_2024.xlsx (773.5 KB)
I would suggest to change your CSV column name to numero_identificacion_key because I think it should improve performance. See the XLSForm docs on data preloading:
Each csv file should contain at least one column that can be used to uniquely identify each row. Such columns will be used, at survey time, to look up which row's data to pull into the survey. For the columns that will be used for looking up rows add _key to the end of the column name in the first row. Any columns with names ending in _key will be indexed for faster look-ups on your survey devices.
Here's an example that uses the pulldata() function in a series of calculation type questions to get the other values for an ID number from the csv file. Note also the use of the parameters column for the initial select_one_from_file question. See cacao_aci_2024.xlsx (45.2 KB) and id.csv (2.0 MB)
Unfortunately, you cannot add the value into the text field as the default.
You might instead use a select_mulitple to ask if any fields need to be corrected and then show text questions for only those fields. See this example: cacao_aci_2024_v2.xlsx (46.3 KB)
Note that your source csv will not be automatically updated. For a more complex workflow like that you might explore entities - introduction and tutorial example.