Can a group access it's grandparent's cell data?

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.

Thanks :pray:

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?

Thanks for your answer.
My DB is very minimal.
2 types :

  • “tag”, which is basically just a name:string
  • image, which is an image and a list of “tag”

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.

Did I miss something in your message?

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.

Thanks for your answer. I would like to pass the full “image” object to the nested repeating group. But how to do that?

My DB structure is visible on 1 screenshot just above. It is very simple, 1 table “images” and 1 table “tags”.
“Tags” are objects:

  • “name” field, type string

“Images” are objectss:

  • “image”, type image
  • “tags”, type list of Tags

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.

1 Like

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.

Thanks to all in this thread.

1 Like

There are 2 ways to follow the solution @dorilama advised:

  1. add an empty Group (1px x 1px) to your parent (image) RG and set a data type =. current cell’s image
  2. 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.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.