Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme #51

Merged
merged 1 commit into from
Nov 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading