Quick tech call: rectifying current() in choice filter

We sometimes organize informal calls on Slack to discuss a quick dev issue. This time I wanted to try a slightly more formal approach to make sure anyone interested sees it. Anyone working on improving ODK tools is welcome to schedule this kind of call as they find useful.

I'd like to discuss how to support choice filters in repeats. This has been a long-standing limitation and results in support questions such as the recent When I try to filter choices in a repeat, why do I get a type mismatch error?. The answer should be to use a relative XPath expression in the filter but Collect/JavaRosa currently doesn't interpret current() correctly. Details are at https://github.com/opendatakit/javarosa/issues/293. The eventual goal would be for XLSForm to output those relative expressions by default as discussed at https://github.com/XLSForm/pyxform/issues/4 (@Ukang_a_Dickson even has code ready to go for this).

Rough agenda:

Plus, you get to hang out with @dcbriccetti and @ggalmazor who have already said they're interested in joining me on this JavaRosa adventure.

One thing that would be extremely helpful to get from the call or on this thread is examples of forms that use current() today. We would use these in tests to make sure behavior is consistent where it is currently correct and to decide how to communicate and help users recover from depending on the bad behavior. @Ukang_a_Dickson would it perhaps be quick for you to see roughly how many Ona-hosted forms use expressions with current() and is that something sufficiently generic that you could share the order of magnitude (1000s, 100s, dozens, none).

Join the call at https://www.uberconference.com/opendatakit

2 Likes