Hello guys, I am wondering if there is any way a nested-group can access it’s GRANDparent’s cell data?
I am in this situation where I have 2 nested repeating groups.
Top level group (red) displays “images”
Nested group (blue) displays “tags”
In my DB, I have a table “images” that has a field of type “tags” which is a list.
At this moment I want to be able to delete a tag from an image when clicking on this small trash icon.
How is your images <-> tags relation is customised? You have a separate field “tags” that has “Tag” field type (is a list) in Image data type? Or another setup?
Anything outside a repeating group can be used.
A nested repeating group can access a group in its parent’s cell. If you give that group the current cell’s data you can access it from the child repeating group.
And you can keep going with the nesting levels.
I am not sure to fully understand.
The nested repeating group (blue) expects a list of data as a type. So I need to define it’s type to “tags” as this is the only field from “images” that is of type field.
Whenever I build a long relationship like that I make sure to pass all children data to a parent or vice versa. Depends on a specific case how I design the DB structure.
I’m not talking about the data source of the repeating groups.
Your nested repeating group (blue) can access data from a group in the corresponding cell of your parent repeating group (red).
If you want to access the current cell’s image (red) from any tag (blue) you can reference it as I explained in my precious post. Just assign the image data to a group inside the cell of the red repeating group.
If I understands correctly, you are saying that I should put another group in between the red and blue one, as shown on this drawing.
The new, green group being of type Image and getting the image from the paren’ts (red) row.
EDIT: OK that was the solution. Thanks a lot @dorilama , it took time but I got it. I didn’t imagine I could create an inner group just to pass some data around.
Oh and BTW, I think I’m starting to understand better : my RED group drawing was flawed as I should have drawn it around everything since its a repeating group.
There are 2 ways to follow the solution @dorilama advised:
add an empty Group (1px x 1px) to your parent (image) RG and set a data type =. current cell’s image
put child (tags) RG into an additional Group and set a data type = current cell’s image
Same idea, but #2 is better solution not to have that extra empty Group from solution #1 in your parent RG cell.
P.S. To be honest that came as a surprise to me. I used to assume that a Thing (Image in your case) from parent RG is easily accessible for a child RG and its workflows via “Parent group’s Thing” (so I thought that child RG treats parent cell as a Group in terms of data source, but it occurs not to be true).
I’ve searched via the forum and found pretty much threads with same problem as you (referencing parent from a child in nested repeating groups setup). As a result the solution is the same → create an additional Group to store parent current cell’s Thing and reference it from child RG.