Randomly select a name from age group (under 5, 5-15, over 15 )

You can absolutely do this kind of thing with the ODK form specification! Unfortunately, XLSForm doesn't make that super obvious but you can write XPath expressions within an XLSForm.

This form shows an example that you can hopefully follow to get to your desired behavior. I used XPath syntax where necessary for filtering and XLSForm's compact ${} syntax elsewhere. I hope it's clear enough that you can pattern match without necessarily understanding all the details.

3 Likes