javarosa icon indicating copy to clipboard operation
javarosa copied to clipboard

jr:choice-name call using indexed-repeat outside a repeat with unbound reference as second parameter crashes

Open lognaturel opened this issue 2 months ago • 0 comments

Forum post, report from support@

Some folks have expressions like jr:choice-name(indexed-repeat(${choice}, ${thing}, 1), '${choice}') in existing forms. This is intended to get the label of a selected value in a specific repeat instance from outside the repeat. People use it to display a summary of repeat data.

This generally worked ok before https://github.com/XLSForm/pyxform/issues/603 when jr:choice-name was often used with inline choice lists. Now, an XLSForm that worked before gets converted to use secondary instances instead and that crashes because the reference we use to identify the current choices is unbound (it references a full nodeset rather than a specific node). With secondary instance choice lists, there could conceivably be a choice filter on the list that makes the choices different depending on the repeat instance.

lognaturel avatar Apr 12 '24 21:04 lognaturel