Hide select one external on repeat

What is the problem? Please be detailed. I have a select one based on an external csv. For example. when you enter a room number "T0001", It looks through the csv and pullout a list of T0001/1, T0001/2 and T0001/3 which are also select one.
I want when the user select T0001/1 and answer the question under that and next it repeats the list T0001/1, T0001/2 and T0001/3. When the repeat happens it should hide T0001/1 since it has already been answered.

What ODK tool and version are you using? And on what device and operating system version?inventory.xlsx (12.9 KB)
assets_toolbox.csv (8.5 KB)

attached is my form and csv data

Hi @Senyo_Aborgah,
Thanks for your question on the other thread. I'm actually not sure how to do this, after taking a look at your form. But also really interested in the answer if someone else has a suggestion. This would be a great solution for anyone taking inventory regularly.

In the meantime, I'll let you know if I have any other thoughts.
Thanks, Janna

Hi @Senyo_Aborgah

Not sure if odk can do that. But one way of fixing that to make sure the items are selected only once per repeat is to use constraint .

With a repeat you can use a function position(..) to get the position of the current repeat.

Then you can modify your "inventory_number" and remove "inv_code" since you already capture it .

if(${inventory_item} = position(..) and count-selected(${inventory_item}) = 1, true(), false())

With that constrain you will be checking selected item and position and returning desired message such us "Wrong , Select inventory item in the order of repeat!"

With such a constraint you are sure that items will only be selected once per repeat. Provided all items require responce. Not just reporting fewer items.



1 Like

Hi @dicksonsamwel, @Senyo_Aborgah,
Would this solution mean that they couldn't select, say, only the third or fourth item of the list, as the first item to count?

I imagine that would be somewhat tedious while taking inventory, as you'd have to enter "0" for every item, just to get down to the item you actually wanted to count, but it is an interesting workaround.


Hi @janna

Yes, note my statement "Provided all items require responce".