KoBoCollect vs KoBo web indexed-repeat error from select_one_from_file

Hi, I’m creating a form to register my farmers. I have a select_one_from_file
for the loc_level4. There are many choice repeats because same loc_level4 names are used in different loc_level3.

Here is my form (kelurahan = loc_level4):
Wanatani Lestari 1 - Farmer Database.xlsx (184.7 KB)

and here are my supporting files:
kelurahan.csv (563.1 KB)
staff - Copy.csv (544 Bytes)

I’ve been working on this for days and broke them down in parts and sometimes it works fine sometimes it doesn’t. Here is my current biggest trouble:

Form works fine in the web browser but it keeps showing this on KoBoCollect.

I’ve added ‘allow_choice_duplicates’ since the beginning. I’ve read so many support/community pages. I just don’t know what else to do. Please help me.

Thanks in advance.

Welcome back to the community, @projectlead! Your issue seems to be here …

You should be able to learn more about the instance function here.

Hi! Thanks for the input.

Yes, from the error code, I understand the same thing… As you can see, in my kelurahan.csv file, there are duplicate names like these

They have the same name (kel_code) but from different choice filters. I use the instance function to get the label for my summary section at the end.

Looking at the article, it seems that I should try the pulldata function but the csv stays the same… so the same issue will arise.

What do you think?

I think I figured it out.

I concatenated all loc_level3filter in my csv file that has the same kel_codes:

Then in my choice_filter column for select_one_from_file I change it from loc_level3filter=${farmer_loc_level3} to contains(loc_level3filter,${farmer_loc_level3}) and keep the instance function to get the label instead of the value the same because there are no more duplicate fields.

Very very happy right now :smiley: