Using indexed-repeat with a logical statement

Hello,
I’d like to be able to pull data from an earlier repeat into a shorter repeat (containing a subset of the values from the first repeat).

As such, I don’t want to use position(…) because that would pull data from the same index as the first repeat. What I would like to do is have something like:

indexed-repeat(${data},${first_repeat}, ${second_repeat_ID} = ${first_repeat_ID}

in order to pull the data from the instance of the first repeat that matches the ID of the second repeat.

Is there any way to do this?

As far as I know you can also reference the parent, e.g. …/position(…).

Hint: Be careful with repeat references. If you go back and delete and add a (repeat) case things might get mixed up in the following references, count() functions etc.

1 Like