This is an expected behaviour. The calculation will be redone, on open/save.
You may need to use once(now…).
@Kal_Lam is there yet a solution for this?
Not yet @mikev897! We will update this post whenever we have an update for this.
I am still struggling to understand the basic mechanism of this new feature and would be very happy, of someone could explain.
I understand that data collected in a parent project can be dynamically “pulled” (no csv needed) into the form of a child project (already not sure whether this requires online connection or whether all data from the parent are stored when refreshing GetBlank Form, which would strongly increase the size of the form). If I had a situation that the same form is applied in clearly distinct rounds (one after the other), this approach seems to be very useful. However, we have “overlapping rounds”, i.e. one site is visited for the seventh time when another is visited for the second time. The time between visits can vary strongly. With other words: We would have to define a new child project every three days or so.
What we need is not an (endless) sequence of child’s children, but a loop: The parent is the child of itself, so that the form can show the entry of the same form when it was used the last time.
Yes, this is possible and we will be updating the article soon!
Oh, quite surprising, but definitely fantastic news that it already IS possible (and only the guidance is missing). Great!
Is there a draft of this section of the support article? We would be happy to test it and help to fine-tune…
The level of suprise has increased after testing the currently described parent/child feature: I really wonder how multiple forms (from repeated visits) with the same identifier (school id, in our case) can be handled. The described setup leads to an error message for this:
Dear kobotoolbox team
Can you already tell when the anounced article (parent child LOOP) will be available?
@york_rff, updating the article should be quick, but there are still issues when you edit the submissions for such linking (linking the same project dynamically). Thus this is why we have not updated the same at the moment. Thank you for your kind understanding!
Dear Kobo team,
I designed a repeated form to collect household information (parental project). Each individual in-household will have a unique ID (pid)
Then I designed a form to collect KAP of every adult in the household (child project). I want it pull all information (gender, age…) from individuals in parental project when the pid is entered.
I tried command like this, but it did not work
instance('parentproject')/root/data[hh/pid = current()/../pid]/hh/name
Which command I could use in this situation?
@kienl, do you mean you wish to dynamically link a project with another project from a repeat group? If yes, please be informed that this feature is not supported yet.
FYI for everyone in this thread who expressed interest in having the dynamic attachments feature worrk for
select_multiple questions, Kal has turned this linked thread into a feature request that you can all vote for!
My understanding is yes, you can calculate a single variable, and set it as the value for a select question.
What you cannot currently do is use it as a source of all the available options list.
Sorry, did not well understand what you exactly want to do. Create/copy dynamic choice labels from an external source? Use an external “choice list” directly in the form?
(How would like to get choice labels in this case?)
Suppose you have a text question (let’s assume it’s
Q3. What is your favorite holiday destination?).
respondent 1 inputs
Nepal in Q3 in
respondent 2 inputs
Thailand in Q3 in
respondent 3 inputs
Dubai in Q3 in
respondent 4 inputs
Singapore in Q3 in
Following your approach, you will only be able to get the current holiday destination you entered in Q3. Let’s say if you entered
Nepal in Q3, you will be able to display
Nepal in your question where you linked it by the calculate question.
But, @yjouanique wants to display all these choices collected by
respondent 3, and
respondent 4 as a
select_multiple choices using this dynamic attachment feature. So the option for the desired
select_multiple question for the desired question would be
4. Singapore in a dynamically linked project.
So the idea here is that
Q3 will be called in a
parent form, and then the options should be displayed in the
I hope I understood you correctly @yjouanique! Feel free to correct me if I misunderstood you at some point.
And probably the relating choices list should not include duplicates? For example, a respondent 5 selected Nepal in Q3 also, but Nepal would only be once in the new list (i.e. select distinct … in database words).
Dear Kalyan, any news on the article update?
Sorry, @york_rff, the feature still needs an update that has not been made yet. Hence the update of this article is still pending!
Please, were you able to sort the duplicate issue? I think I have a similar problem with a working form.