I am trying to get a multi-select question to be populated by previous responses from within a repeat (the multi-select is outside, after the repeat). I want to be able to update the multi-select without going back through the repeats (because this is a summary and the repeat is long and tedious
) - kind of a quick way adding what exists but has not been examined in detail, so that we can maybe go back later if more detail is really needed.
Importantly this is not about filtering out choices shown on the multi-select - more like 'see what you've already collected, have you missed (or not bothered to record) anything minor?', rather than only show what hasn't already been covered earlier.
Example:
The repeat includes a select_one (e.g. ${repeat_item}) that uses the same list as the multi-select from the choices tab. I would like to use the multi-select to show which items have already been selected (and allow additional items not in the repeat to be selected).
- Choices A B C D E F
- fill in 3 Repeats (select_one) A C E
- Multi-select calculation should show all options (A B C D E F) but have A C E already selected. And be able to select other items
Setting a calculation in the multi-select as join(' ',${repeat_item}) populates the list.
So far, so good.
BUT, if the surveyor makes any changes to the multi-select, they are lost when any calculations are done (e.g. form save) and it resets to the list of ${repeat_item}
So this seems to be mainly about when calculations are performed... I can sort of fix it by adding a trigger based on a third (unrelated) question, that is outside the repeat I can retain the changes to the multi-select, which NEARLY meets my needs! Using once() on the calculation doesn't solve it either, for fairly obvious reasons.
I have not found a way to be able to update the repeats (either change, add or delete) and allow that to MODIFY the multi-select without losing any differences that were in the multi-select. I tried adding another calculate outside the repeat to 'hold' the extra items thinking it could concatenate with the Join, but I can't work out how to stop it being overwritten before the multi-select is reset.
So my question is: can this be done? I've asked Kapa and it didn't get as far as this but did recommend asking the Forum! So here I am...
The surveyor can update the list manually by going back to the repeats, but this is error-prone.
I know it's a bit 'niche'! It's about trying to speed up the initial field data collection - it is encounter-based survey rather than a predetermined list of activities or features, so we don't know what we don't know until we find it, and it may not be important enough to collect every aspect of every item because life is short ![]()
