How can I create a selection parameter? I mean, when the user select one or multiple rows, the selected fields will be deleted from the data base (where the repating group info is coming from) by confirming clicking on red button (see second image)
I’ve tried several times but i didn’t find the correct way to do this.
Thank you in advance!!
Make sure the popup or group with the red button is from the same Thing as your repeating group. Then when you click a row or delete icon on your repeating group the workflow action is to show the popup but also display data in the popup. The data should be current cell’s thing.
Deleting multiple rows at once is a far more complex workflow though!
Hi @vinicius.tst.eng, here’s how to do this with a custom state that will temporarily hold the value of the selection(s).
- Workflow: when a checkbox value is changed > set state:
For the custom state action, choose the pop-up as the element for the state. Create a new state. Name it something like “Selected Things”, and it should be the type of thing you’re deleting as well as a list (check the list box). Once created, set the value to the custom state’s value :plus item current cell’s Thing. Eg “value = Popup’s Selected Things :plus item current cell’s thing”
Now every time the checkbox is checked, a temporary list is being created.
- Add a condition to this workflow event: only when this checkbox is checked. Because you only want to add to the list when it has been checked. If the user changes their mind or makes a mistake, they can deselect by unchecking the box and you’ll need the following separate workflow event:
When checkbox is changed and this checkbox is unchecked > set state (choose the same state), value equals Popup’s Selected Things : filtered unique ID <> current cell’s thing’s unique ID
So the filter basically removes the selected from the list.
Now, you can have a text in your pop-up that says something like “Are you sure you want to delete Popup Selected Things :count Items?”
When confirm button is clicked in popup > delete a list of things : select type and list to delete is your custom state value.
Hide popup. Show alert message that tells the user it was successful.
This still works fine even if the user only selects one item.
Gaby | Coaching Bubble
Private coaching, courses, and tons of free resources
Hey romanmg! Thank you very much for the explanation!!
I am a new buble user and I am still getting used with the logic… So, if possible, could you please explain this process showing some images? So sorry for that, but I really to do this.
Thank you very much once again!!
Sure, I can get some images later today when I’m by my computer, but for now you can also check out this thread here that covers the same process with images:
I’ll see if I can do what I need by seeing this post but anyway I look foward for hearing from you! =D
Have an amazing day!!
Thank you very much for the help!! Now it’s working perfectly! =D
But I still need one more help: I’ve inserted a trash icon in order to allow the users to select multiple lines (or even just one) and it shows the pop up to confirm the deleting action but I want to show another pop up when the user do not select any row. How can I do that?
Thank you in advance!!
You will need a Condition on the Trash Can workflows that references how many Items are in the Selected Things list. Then you will show the correct popup depending on how many items are in that list
Geoff | Wolfer Tech
Read about How I Used Bubble to Create a Profitable Startup
Check out The Most Used Bubble Template (FREE)
Thank you very much for your reply but I did not find the condition you showed on the example.
The number of selected items can be one or 1 thousand, I mean, I was thinking if there is any condition like this: If there is no items selected then show pop up B… somethink like that… OR the trashcan is not visible when there is no item selected… Is it possible?
The Greater than or Equal to “1” will take into account any number of items in the list.
While the Less than or Equal to “0” is the same as saying - When this list is empty
You could put the same login on the Trash Can’s Conditions to make it not visible by saying
When Custom State’s Selected Things:count less than or equal to 0
Make this element visible (unchecked)
Perfect!! Thanks for the help!
Two more things I’d like to do with this list:
How can I do this?
Thank you once again!
Does anyone can help me with this?
Thanks a lot!
- Put a checkbox outside of the Repeating group
- Put a 2 conditional workflows on the Checkbox:
When this checkbox is clicked and is checked Yes,
Set State of Selected Things -> Set Value to Repeating Groups List of Things (adds every item in the repeating group)
When this checkbox is clicked and is checked No
Set State of Selected Things -> leave the Value box blank
- Use a Group in the Row, and put a condition on the Group.
When List of Selected Things contains Parent Group’s Thing -> Background Style=flat color, Background Colour=your colour choice
The second topic is done but I did not get the first one. Could you help me please?
This is how you would add all the items in the repeating group to the list
This topic was automatically closed after 70 days. New replies are no longer allowed.