"Context node was not supplied" with nested repeat group

Hi,

I have create à form for describe the lithological description. In my situation, the form is little bit complex, I have some nested repeat group :
I have mutiple "core sample" (my LITHO repeat group)
for each core sample:
--I have multiple "lithological description" (my LITHODESC repeat group)
--for each lithologi:
----I have mutiple "sample bottle" (my FLACON repeat group)

I post (a simplify) example :
XLSFORM_bug.xlsx (16.8 KB)

All along the form, I want to recall the depth and some other informations for contributor readability (in reality, my form is much bigger :slight_smile:)

The bug :
I fill in the form, normaly, I add a group “LITHO” (the last), I fill in, and I add a group “LITHODESC” in my second “LITHO” group.
I get a error (in console) no context element found ... and some other.
In the UI form, some input element has broken. If I continue to add repeat group, the bug continue too.
To begin, I thought it was because of the position(…) calculate element.
I remove that and the problem is now on other calculation :
XLSFORM_bug_without_post.xlsx (16.6 KB)

Did i make a mistake in my form ?
Do you have some idea for fix the problem ?

Thank you !
Jonathan

Hi @jdugh,

Could not be clear on what you intended to do. Could you please provide a brief explanation so that we could have a look at your issue.

Have a great day!

Hello,
which KoBo tool are you using (KoBoCollect? or Enketo?) and which server?
You can trace your problem, if you temporarily change all calculate types to text type. So you will see, where what goes wrong.
Have a safe week.

Hi,
@Kal_Lam, sorry if I not clear. I want to use/show information fill out in a group (repeatable) in a nested repeatable group.
@wroos It’s on Enketo with kobo server (https://kobo.humanitarianresponse.info/).
I trace my probleme with a note type and ${} format.

A more simplify example : https://ee.humanitarianresponse.info/x/H2pOaXlt (based on the XLSForm example in my first post).
If I add two repeat group (the first level), I get the error in the console and a disable input in the form.

I hope to be clearer,
Thank’s for all.

Hello @jdugh ,
Just a remark. We experienced that sometimes a ${}in a note (or other type) label may show correctly, but the calculation did not when the ${} was shown or used directly. So, sometimes we track it with both options for testing.

I think there is some bug in variable referencing in repeats in Enketo at the moment. We have similar problems.
(You may test with KoBoCollect and probably it may work well.)

Side-note: Also take care that in general if you go back and delete a referenced case (except the last one) you will get a mix-up of following data already entered, as the KoBo reference is done by position(…) not by fix ID.

Hello @wroos,
Thank you for your response.
I have try with KoboCollect and I don’t have the problem. But I want to use the smart and graceful Enketo :slight_smile:
I built an even simpler example : https://ee.humanitarianresponse.info/x/gVXvKbev
If I adding some repeat group, I have the bug.
If i save as draft and restore the form, I have this :
image
And in the console, I have :


If I remove all the reference with ${} in the label, there are no problem. But “obviously” I need this :frowning:

I have try with ${} directly in note label, also in calculate field. I have also try with XML path in calculate field and show the result in note label.
Can I use the position(…) function in XML Path (like an array) ? Maybe this is a solution for me ?
For example /data/GROUP_LEVEL1[position(…)]/LEVEL1 and some /data/GROUP_LEVEL1[position(…)]/GROUP_LEVEL2[position(…)]/LEVEL2. But I think I can’t

Thank you for your time !
Jonathan

Hi @jdugh,

There are 2 xlsforms that you shared previously. Which is the one that has issue with. Could you please share it once again and let the community know. I assume it’s a design issue.

Have a great day!

Hi @Kal_Lam,

My previously xlsforms are finaly too complicated/superfluous.
Here, a simple xlsform for reproduce the bug :
XLSFORM_repeat_nested.xlsx (22.7 KB)

I have try to insert the tutorial for create the bug in the xlsform. Little complicated to explain, so I have make also a screen shot for reproduce the bug (a little big image, sorry) :


In this screen shot, we only see on the last nested group, question “Level 3”, a readonly input. But in the console, we can see the problem :

After that, If I fill in this Level 3 question, I get a “Data node […] ignored”. If this question is required, I cannot submit the form (although I fill in), and if it is not required, I don’t have this data in export (XLSX).
And if I save as draft this form, and reload the draft, I am this message :
image

I hop I am the problem and I make a mistake in my xlsform.
If I am not clear, sorry, I can try to rexplain.
If you need more explanation, tell me.

EDIT :
From the beginning, I thought it was because the ${} fonctionnalities. But no.
I have remove all the “note” question in the xlsform from this post, and I have the same problem.

And Thank you for all.
Jonathan

1 Like

Hi @jdugh,

Thank you for bringing this issue to the community and providing a clear sample for discussion. I tested it at my end and wanted to let you know that i did not see the error message that you have been seeing.

Furthermore, i just wanted to let you know that if you click the first + sign it will make a repeat to Level 3 only. Similarly, if you click the second + sign it will make a repeat to Level 2& 3. Similarly, if you click the third + sign it will make a repeat to Level 1, 2& 3.

For details, pleas see the image as shared below:

If you look at the shaded part closely, you should be able to see the repeat groups that has been shaded distinctly. Maybe this should help you understand the nexus of the nested repeat more clearly.

Have a great day!

Thank’s for your test and explication.
I have try multi combination/continuation of form filling, but it would seem there are just one way for make the bug. :upside_down_face: :

For create the bug, I fill in the question Level 1, then level 2, then level 3.
I click on second + (Repeat for Level 2 & 3)
I fill in the new questions Level 2, then Level 3
I click on the third + (Repeat for Level 1, 2 & 3)
I fill in the new questions Level 1, then Level 2. Here, the new question Level 3 is not visible. So, I click in the first + (Repeat for Level 3), and I fill the new question Level 3
Then, I have the bug with Data node: [...] ignored for this last Level 3 in the console.

There is no more the error no context element found in the console. This message appears if I use ${} for reference the value of child repeat group.

With some note :

I hop my tuto is more clear. If you cannot repeat the bug, maybe I can send a vidéo ?

Have a great day too !

1 Like

Hi @jdugh,

A video would be an easy way to explain. Could you kindly please share with the community!

Have a great day!

Ok @Kal_Lam.
I cannot upload the video here (video format is not allowed).
So I uplaod video here :
https://gofile.io/d/peK5LS
(apparently without date expiration for download)

I send also the error in console when I try to submit my form in the video :


(if needed)

EDIT :
Sorry, the console error is not a part of the current problem. We can obmit this for this post.
I have remake a video below

Good evening to you

Hi @jdugh
I have a quick query on your form based on your video and the XLS form you shared. When I look at your video, I see that there are notes that reference a question from a previous repeat group. Given that you have nested these and it is not clear which instance of repeat or nesting you are referencing, could this be the cause of your issues? Could you try running the form again without specific references.

I would recommend that you look at the extensive discussion that happened on the ODK Forum and see if there is something that addresses your concern first

Stephane

1 Like

Hi @stephanealoo,

Thank you for your reply and for the discussion link.

I feel my problem is strange, unusual and hard to explain :slight_smile: !
I have restart a project to zero. I have create 3 nested repeat group with kobo (in web interface) with 1 text question by repeat group.
And that’s all :
aU5bmuHyPETSSz8xeM9Jjq.xlsx (9.4 KB)

I my new video we can see (at the end of fill in the form - time laps 0’27") the console log Data node: [...] with null-based index: 2 not found. Ignored. I can submit my form; Except if the question "Level 3" is required. And at the end of video, when I edit and reload my submit form, the last Level 3 is not load with the response (also in the export, I don’t have the last Level 3 data).
My new video :
https://gofile.io/d/UZOeky

Jonathan

Hi everybody,

My problem seems to be the same as this issue :

So, I will marked this message as the Solution to avoid duplicates discution.

Thank a lot for all !
See you soon (and happy new years)

1 Like