Trouble Displaying Image from Selected Topic in Repeating Group

Hello Bubble.io Community,

I’m currently working on a feature in my app where I have a repeating group displaying a list of topics. Each topic is an option set with two attributes: text and image. When a topic is clicked, I want to display the corresponding image on the right side of the page.

Here’s what I’ve done so far:

  1. I’ve created a repeating group (“RG Topic”) on the left side of the page to display the topics.
  2. Inside the repeating group, I have a group (“Group Display”) with a text element set to the current cell’s topic.
  3. I’ve set a custom state (“selectedTopic”) on the “Group Display” to the current cell’s topic when the group is clicked.
  4. On the right side of the page, outside the repeating group, I have an image element where I want to display the corresponding image of the selected topic.

The issue I’m facing is that I’m unable to set the source of the image element to the image attribute of the “selectedTopic”. When I try to insert dynamic data for the image source, I can navigate to Parent group 'Topic's Display, but I don’t see an option for selectedTopic's image.

I’ve checked that my ‘Topic’ option set has an ‘image’ attribute and that the ‘selectedTopic’ custom state is of the same type as the ‘Topic’ option set. The workflow for setting the ‘selectedTopic’ also seems to be correct.

Could anyone please help me understand what I might be doing wrong or if there’s a step I’m missing? Any guidance would be greatly appreciated.

Thank you in advance!

Just to give you an idea I am attaching a 2 screen shots from a website where on left when you click a group (topic) corresponding image is displayed on the right.


I can see the custom state is inside the repeating group cell (because it is attached to Group Display which is inside the cell).

You might try to put the custom state outside the repeating group or to the repeating group itself. Basically, there should be only one custom state for your setup to work.

Then, outside the repeating group, you can use it normally.

See the demo for this setup:
chrome_ZFki52xyMd

1 Like

YAY, That worked. Thanks a lot. :pray:

:pray:

1 Like