I have a RG on the homepage showing a list of Events created by users. A user can see all the Events that they posted from within their dashboard and they should be able to modify/delete each Event.
The dashboard page shows a list of Events created by the Current User, but the “Delete” is giving me some issues.
I have selected to delete the “first item”, which is incorrect because it doesn’t delete the Event you click on, it (of course) deletes the very first Event created by the user.
I have looked through the other options but there is nothing which says “Delete this item” or similar. Am I missing something in the way I am communicated with the Events data type?
Why are you doing a search here?
You don’t need to search for events (the events are already loaded in in the RG) - you’re trying to delete the specific event from the current cell.
So the thing to delete should simply be the current cell's event
.
Wow, honestly I didn’t think it would be that easy! I can’t see how Bubble knows that the delete button is connected to the specific event which is being deleted without me “searching” for it. That said, it works and I’m thanking you again for your help!
Because it’s contained in the RG cell.
That’s how Repeating Groups work.
A list is loaded into the RG, with each cell containing the data from a single item in the list (whether its a list of database items, or some other data source).
Everything inside the cell (buttons, text, images, etc.) can refer directly to that cell’s specific item.
So when you run a workflow on an element within the cell to edit or delete that cell’s specific item (in your case an Event), you simply refer to the current cell’s item.
1 Like