Forum Academy Marketplace Showcase Pricing Features

Delete entry from Lists [ Movie having many Theatres, Delete one Theatre]

Hi ,
@NigelG @romanmg

I need help from Bubble,

I have Cinema Data Type -> Cinema,=> Which have cinema_name(Text Field), cinema_theatres_list ( List of Theatres)
Data Type -> Theatres => Which have theatre_name (text field)

I have added few Theatres and movies.
Movie may have more than one theatre.

Till here everything working fine.
For Reference i have created Test Page, Click on any movies in RG , You can see the theatres list below for that movie.
But, How can i delete one theatre from movie list…?

Thanks
Arjun

Have a button inside the Theatre list Repeating Group cell. When that button is clicked > “Make a change to Thing” - choose “Movie” as your Thing (I’m assuming that’s another data type).

Then update the Theatre list field: “Theatre List remove current cell’s Theatre.

Your data structure and field labels might be different, but if you’d like to share a link to your editor, I can give you more specifics.

1 Like

Link to Editor -
@romanmg

Since Theatre Listing Cell contains all the Theatres for selected movie in RG1,
Adding the button inside RG2 Cell , How can i delete only one element ( I mean Theatre from the List)
RG2 Cell displays all the list in each cell , not each theatre in each cell…?

May be RG should not be used for this scenario.

Hi

@romanmg

I am able to filter and get theatre list for a movie from dropdown
RG has now Theatre Name and Delete Button,

I need workflow for Delete Button,

In your workflow, the error is because instead of removing the theatre object itself, you’re trying to remove the theatre’s name:

Change this to “Current cell’s Theatre” and you should be good to go.

Hi Daniel,

I have changed to “Current Cell’s Theatre” , But still its not working.

You can check it by deleting few theatres from list, Its test database only , So Not a problem.

I typically try to avoid list fields unless absolutely necessary. Can a Theatre only belong to one Cinema? If so, I’d suggest adding a field to Theatre of type=Cinema, and removing the List of Theatres field from the Cinema data type. You can always display a list of Theatres by doing a search for Theatres with a constraint Cinema=[whatever Cinema].

With this tweak to your data structure, your workflow for the Delete button in the repeating group of Theatres is simply a single action: Things->Delete a thing->Thing to Delete: Current Cell’s Theatre.

I have tought initally the same Having Theatre only belong to one cinema , but since some theatres play more than one cinema in a day Ex-

Theatre 1 - Morning =Cinema 1 , Afternoon= Cinema 2 , Evening= Cinema3,

I think I have to re design my database, Let me see what best can be done.

Thanks @daniel3

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