I’m working on a form with a loop, and I need to filter the response options based on the loop “subject” (or position). The form works well in the first loop but doesn’t in the others. I’m currently working with a “selected-at” in the “choice-filter”; I’ve also tried the “filter” and “cascading” options, and took a look at “current()” but couldn’t figure it out.
My loop is based on the # of visible elephants, and for each of them, I want to know who the nearest neighbor is. In the options, I only want to include the elephants that were previously selected, except for the elephant that we are currently assessing in the loop.
In the choice-filter I’m adding this function based on my previous variable “visible-elephant”, which was the select-multiple question for the loop:
(selected(${visble_elephants}, name)) and not(selected(selected-at(${visble_elephants},position(…)-1), name))
I believe the problem comes at the “position(…)-1”, as it is not dynamically changing. Any clues on this?
To answer your questions @Wros, yes I’ve played with the position and it works fine, as well as the online validator, and I’m currently using Kobo and I don’t get any error messages.
To make this a bit clearer here is the screenshot of my loop. You’ll see in the “verification note” that the second loop is not working properly.
I’m still unable to upload any file, I’m getting an error message “Sorry, new users can not upload attachments” (@Kal_Lam, any ideas on how to fix this?). Alternatively in the google sheets link I left above you’ll find the form (and the screenshot) for your reference.