Skip to content

Commit

Permalink
Merge pull request #51 from rodekruis/dev
Browse files Browse the repository at this point in the history
update readme
  • Loading branch information
jmargutt authored Nov 4, 2024
2 parents 85e5604 + 8a34dc8 commit 7465e47
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ Details: see [the docs](https://kobo-connect.azurewebsites.net/docs).

Using the [`kobo-to-linked-kobo`](https://kobo-connect.azurewebsites.net/docs#/default/kobo_to_linked_kobo_kobo_to_linked_kobo_post) endpoint, it is possible to update a multiple-choice question in a Kobo form (_child_) based on the submissions of another Kobo form (_parent_).

Example: the parent form could be a beneficiary registration form, and the child form could be a follow-up form, or a distribution form. The child form could have a multiple-choice question (`select_one`) with the possible values being the names or the IDs of the beneficiaries registered in the parent form.
Example: the parent form could be a beneficiary registration form, and the child form could be a follow-up form, or a distribution form. The child form could have a multiple-choice question (`select_one`) with the possible values being the IDs of the beneficiaries registered in the parent form.

> [!TIP]
> Make sure you understand what you can do with Kobo's [Dynamic Data Attachments](https://support.kobotoolbox.org/dynamic_data_attachment.html). You should use those if e.g. the question in the child form is not a multiple-choice one, or you need to pull specific data from a specific parent submission.
### Setup

1. Define which question in the parent Kobo form needs to be saved in which multiple-choice question in the child form.
2. [Register a new Kobo REST Service](https://support.kobotoolbox.org/rest_services.html) for the Kobo form of interest and give it a descriptive name.
2. [Register a new Kobo REST Service](https://support.kobotoolbox.org/rest_services.html) in the parent form and give it a descriptive name, e.g. `update child form`.
3. Insert as `Endpoint URL`
```
https://kobo-connect.azurewebsites.net/kobo-to-linked-kobo
Expand All @@ -26,7 +29,7 @@ https://kobo-connect.azurewebsites.net/kobo-to-linked-kobo
- Under `Name` insert `kobotoken` and under `Value` your Kobo token (see [how to get one](https://support.kobotoolbox.org/api.html#getting-your-api-token)).
- Under `Name` insert `childasset` and under `Value` the ID of the child form (see [where to find it](https://im.unhcr.org/kobosupport/)).
- Under `Name` insert `parentasset` and under `Value` the ID of the parent form (see [where to find it](https://im.unhcr.org/kobosupport/)).
- Under `Name` insert `parentquestion` and under `Value` the name of the _question_ in the parent form (whose answers will determine the choices in the child form).
- Under `Name` insert `parentquestion` and under `Value` the name of the question in the parent form (whose answers will determine the choices in the child form).
- Under `Name` insert `childlist` and under `Value` the name of the _list_ (not question) in the child form. Example: if the question `type` is `select_one list_name`, the value should be `list_name`.

> [!IMPORTANT]
Expand Down

0 comments on commit 7465e47

Please sign in to comment.