Dear Team,
I want to pull data from another form which is in repeated question.
Thanks
Dear Team,
I want to pull data from another form which is in repeated question.
Thanks
To pull data from a repeat group in another form, you have two main approaches depending on whether you want a real-time automated workflow or a manual workflow:
Option 1: Using ODK Entities (Recommended for Automated Workflow)
If you are using ODK Central, the best way to handle this dynamically is by turning each instance of the repeat group in your first form into an Entity.
In Form 1 (Source): Add a save_to column in the XLSForm's begin repeat row to push the repeated data into an Entity List (e.g., a list of people, assets, or visits).
In Form 2 (Destination): Attach that Entity List as a dataset and use the instance() function or a select_one_from_file question to pull the repeat data seamlessly.
Option 2: Using Pre-downloaded CSVs (For Manual/Offline Workflows)
If you aren't using Entities yet, you can export the data from the source form and link it as an external dataset.
Export the Data: Download the submissions from the first form. ODK Central will provide the repeat group data as a separate table or CSV sheet.
Attach the CSV: Upload this repeat group CSV file to your second form media files.
Query the Data: Use the instance() function (or pulldata()) to lookup values based on a unique identifier (like the parent submission KEY or a unique ID generated inside the repeat group).
Syntax Example: instance('repeat_data_csv')/root/item[parent_key = ${matching_id}]/desired_value
Option 3: If both are actually within the same form
If you meant pulling data from an earlier repeat group to a later section inside the same form, you should use the indexed-repeat() function instead: indexed-repeat(${question_to_pull}, ${repeat_group_name}, position(..))