Reset repeating group data

Hi , i have 2 queries please :

1- How i can reset the repeating group ,for example in the Bubble lesson " Sending data to pages " if i refresh the page or redirect to another page and back again to the same page where the repeating group exist how i can make the repeating group reset such as the "Reset relevant input " function in the work flow ?

2- if i want to show Text [for example : price ,no.of room…etc ] in the repeating group when user click on the add button [ i can do it by create new data ] But if in the same page there is another button " Submit " with create new data [ Images ] ,BUT the 2 data [Repeating group + images ] are under the same data for example "Hotel " ,how i can do this ? how i can make repeating group data become under the same data such as : Hotel = repeating group data + images data

Best Regards

Hi @ciscotreasure - if I’m following your question regarding #1, when you add/change data to items in your RG, bubble will automatically update it. So if one of your fields, ie price, # rooms, etc, changes, then the RG should update automatically.

Regarding #2, you could have a data type called “Hotel” and another date type called “Images”. Images would then be a field within Hotel (similar to how you setup price, # of rooms, etc). When you add images to “Image” it would be the “child” under “Hotel”. In the RG, you’d search for “Hotel” and then show whatever fields (price, # of rooms, etc) and Images too for the particular cell. Make sense?

Hi nikolai , Thanks a lot for your quick support , please let me explain more for the above question ! ,Kindly check the images i uploaded repeating%20group%20and%20new%20data|690x454

Thanks in advance

and another image for point 2

Hi @ciscotreasure - a couple of things come to mind for dealing with the old data in the repeating group. You can 1) delete it in the “Save” workflow 2) overwrite it in the “Save” workflow or 3) sort it for newest data. The action your app takes will depend on what you want to do with the old data once new data is added in a particular RG.

@ciscotreasure - let’s split this up into two parts, Data Structure and Workflow.

For Data Structure, create two Data Types, 1) “Hotel” and 2) “Images”. Within “Images”, create a new field called “Hotel Images” which will be of type “Hotel”.

For Workflow, once the user clicks “Upload Screens for Product Gallery” and uploads a file, the workflow would be something like below. I’ve also included a picture of the “Hotel” RG with the “Image” RG nested into it.
Is this getting you closer to achieving your goal?

image

image

image

1 Like

Thanks Nikolai for the quick reply , but here i want to reset that data in the repeating group [ I don’t want to clear data in the repeating group ,or remove it or even replace it ] i want to add new data to the repeating group beside the previous data , i want to make repeating group behave the same " reset input " function

  • the case is : after the user add data and display it in the repeating group ,if the user come back again to the same page i don’t want to see these data still exist in the repeating group because i want to add new one

Thanks in advance

What if you had a counter such that every time you add a new image the count goes up. Then when you do the search in the repeating group, there would be a search criteria that if the Image count is less than the result of a “Search for Image:count” (Counter < Search for Images:count) you show the Images in the RG. Otherwise the search will be false and nothing will show in the RG.

If I am following there should be a workflow that says Reset Data Under Element Actions. It is under the Group heading.

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