Looping a variable number of comma-separated items

How can I create a sort of while loop in KoBo?
I want to loop through a list of comma-separated values like this

supportkobo .xlsx (18.3 KB)

It currently returns a dependency cycle error

Welcome to the community, @cyril! Looking at your xlsform, I could see that you are referencing a name categoryName in row 13 that does not exist in your survey sheet:

That’s right, I removed that reference and now get again the same error as before, “dependency cycles amongst the xpath in relevant/calculate”

What does relevant calulate means? I do not have any calulation in the relevant column

Hi @cyril
When I look at your calculate questions, I see an issue where a calculate question is referencing a calculate question that appears much later. This could be a potential problem.

For you issue, a calculate question in row 16 references a calculate in row 19 which in itself references back the row 16

1 Like

So, what’d be the way to loop through the comma separated values in a string?

Hi @cyril
Whatever you are trying to implement is not plausible when you have cyclic redundancies as I had highlighted in my previous post. Unfortunately, you will have to find a different alternative to executing your logic process.

Stephane

1 Like

Hi @stephanealoo
I tried many different ways without success. For the record, I finally solved this by using a custom functionality.
Thank you