Hide select one external on repeat

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.

Regards

Dickson

1 Like