Hi! I’m loving Bubble. I"ve been using it to build out an MVP for the last week or two. Everything is making sense and progress is smooth, but I’ve hit a WALL when it comes to trying to display associate data based on whatever room a user is clicking on. I will break it down for you:
1.) I have a RG (as a sidebar) that has a list of Rooms that a user has created.
2.) I also have a RG (the main content area of the page) that has a list of Topics that a user has created. When they create a new Topic they can associate that Topic to a Room.
3.) The Database is set up as follows: 1 Data Type contains my Rooms (title etc). I have another Data Type that contains the Topics (with an additional field type called Room) this addition filed type populates with the appropriate room name once the topic has been posted. So all of this is working fine.
Where I’m stuck is creating the appropriate workflow that actually displays the correct topics for a room that is clicked.
Another way to think about this is: A category that contains a number of posts. How do I display the appropriate posts for any given category.
It’s worth noting that the following suggestion has not worked:
“When a cell in the left repeating group is clicked
Do the workflow Display Data in a Repeating Group (display in the right group)
And set the value to display as, Do a Search for Topics (with the constraint “Room contains Current Cells Room”)”
In your Topic data type, try setting Room to type Room, rather than text. Then for the constraint you posted above: “Room contains Current Cells Room”, using = rather than contains should work.
Thanks for the reply to this! @gf_wolfer was able to help me out on getting the appropriate data to display. He too said my data types were off. So god to have that confirmed. Perhaps you can help me with another issue I’m having is for the on-states for the “Rooms” that are selected? I’ve managed to get it to turn “Active” but I’m struggling to get the conditional to turn off when you select a different room.
So your ‘rooms’ repeating group has a custom state called active_room (or active) of type Room, and you want to set the state’s value to the currently selected room?
If this is correct then one way would be to put an invisible button in the RG’s cell so that when you click in the cell it triggers a workflow that sets the custom state of the RG to the cell’s room.
If you mean something else then please clarify, preferably with some screenshots.
Thanks @louisadekoya so yes, that sounds like the same thing I’m trying to accomplish. I’ve attached a screenshot of what’s happening right now: I have a conditional set up that is like the following:
Now because of that, it’s activating that each time someone clicks on a new RG cell. SO I’m getting the following effect (Two rooms look active):
What I would like to do is only have the “room” I’m on be active. Will the steps you mentioned above work? If so do I then need to remove the Conditional I have already? What is also not on this is an Icon that I want to include that would delete this Room. I suppose I need to add that on the “Active” state as well or as an Icon that displays when a room is active.