XLSForm / pyxform

A Python package to create XForms for ODK Collect.
BSD 2-Clause "Simplified" License
77 stars 134 forks source link

Form reference in choice used in select in repeat parents up too far #663

Open lognaturel opened 8 months ago

lognaturel commented 8 months ago

Choice labels can include references to fields in the main instance using output. I assume the reference is intended to be evaluated in the context of the select node.

When a choice is in a repeat and attempts to reference a field also in that repeat, parenting goes up too far. I'm not sure whether it's because pyxform doesn't have enough information to get the expression correct or whether it could be made to work. This is weird on a number of levels because the list could be used by different selects in which case the path expression would need to be different.

Sample form