Random Sampling in ODK

Dear Collegues, Am Sam from Uganda and currently working on a project where i need to randomly select 3 persons from a household roster using ODK. So i add people to a household and from that list of household members; i have to randomly select 3 persons (specific criteria needed for these people).

I have been able to put all my eligible household members into one pool eg {1 2 3 4 5 6 7 8 9}
Am thinking of 2 possible ideas moving forward;
1: Randomly sort that list and then select the first 3 items in the list–Still not sure how to implement
2: Randomly select the 3 members directly from the list-- the code i have for can randomly select only 1 person (once(int(random()*count-selected(${pool})))) which may need to be customized to allow for 3 persons.

Still need help Please!

I'm also interested in this on behalf of the Carter Center... If you could please share your solution (if you come up with one!)

If you know the household members ahead of time, you may be able to use some of the strategies I described here.

As far as I know, it's not currently possible to do what you describe when the household member list is dynamic. You can pick three random indexes but you may get the same one more than once.

If you are interested in additional randomization support it would be helpful if you could add to the feature thread here.