-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add randomize(nodeset) and randomize(nodeset, seed) functions #273
Comments
I started exploring this a bit and it's trickier than I originally imagined. |
Here's a quick and dirty first stab at the function itself: https://github.com/lognaturel/javarosa/tree/randomize To be clear, the real challenge comes in actually using it. The intended usage is something like <select1 ref="/form/state">
<itemset nodeset="randomize(instance('choices')/states/state)">
<label ref="name"/>
<value ref="value"/>
</itemset>
</select1>
|
Interestingly, someone just asked a question about using the result of two repeats as the options for a select -- https://forum.opendatakit.org/t/two-repeating-group-and-filtering-specific-field-data/12452. This should be possible by setting the |
See getodk/xforms-spec#51 (comment)
Random
object.nextInt
is used to get random valuesThe text was updated successfully, but these errors were encountered: