Calculation on repeat inside another repeat

Hi and welcome, @Fabien_Pageot! Please take a moment to share a little about yourself and your project at Introduce yourself here! I'm guessing you already know @mathieubossaert and his work but if not, I think you would find ODK to collect species and habitats localities, as pressure and threats to ecosystems related to what you're doing.

I believe you are likely trying this form out in Enketo, is that right? I believe it will work as expected in ODK Collect.

It looks like the sum calculation is being output as sum(/data/plot_registration/species_registration/species_nb) from the XLSForm to XForm converter. However, it should be output as sum(../species_registration/species_nb). You should be able to change sum(${species_nb}) to sum(../species_registration/species_nb) in your XLSForm to get the desired behavior.

nested-repeat-sum is a further simplified form definition. The sum calculation is output as sum( /data/outer/inner/number ). @martijnr does this look like a pyxform bug to you as well?

1 Like