I need to get some information from a repeating group that I’m sure has been an issue before.
It’s pretty simple but I’m sort of stumped. In the example shown below, I have a repeating group of Movies (each cell shown in pink), and in each movie there are actors who need their contracts uploaded.
Each cell of the repeating group has one nested RG for the actors (shown in blue).
When I click on the UPLOAD button from within the nested RG, I just need to capture the Index number of the cell within the Movies repeating group so I know which movie it’s attached to.
I can’t seem to figure out how to get FLYING’s, or MAMBO’s Index number by clicking anywhere in the nested group. Setting the state doesn’t give me options to access it that I can see.
I tried to mess around with Maestro/Musician but couldn’t get it to work because the instructions are pretty sparse. Don’t know if that would be even do the job.
Basically when I click on Phil Campain under FLYING I should get “Index 1”. If I click on Xavier Cook under MAMBO I should get “Index 3” and so on.
Any elegant ideas? I have a custom state ready to receive the information.
FYI, I solved this without any workflows (not necessarily a concern in your case):
(1) Add a text input to your parent RG
(2) On the text input, uncheck ‘visible on page load’ and set initial value to ‘Current Cell’s index’
(3) Reference the text input’s value in any of the parent RG’s child elements