Forum Academy Marketplace Showcase Pricing Features

Help with removing element from a List. functionality :plus/ :minus

Hi,

I am trying to create a database where the user can select some field by clicking on a button as you can see below.
Example : https://essai123456.bubbleapps.io/?debug_mode=true
Live : https://bubble.io/page?version=live&name=index&id=essai123456&tab=tabs-1

My problem is that I have created List of elements where I add items to with the functionality :plus but if the user is clicking by mistake, I would like to be abble to remove the button he has clicked.

By looking at the forum I can see that there is no :minus function available for the list.
Do you have any idea how could I do to avoid the problem?

Thank you in advance

Instead of :minus you set the list to “all the items in the list except this one” using the <> (not equals) function.

Have a look at this … it does what you are trying to achieve I think.

https://buildingonbubble.com/block/selectable-list-1470553906464x624549423891611600

2 Likes

Thank you for your reply, Indeed it does what I would like to achieve but, the issue is that i am not using List, I am using button.
So I tried to apply your technique to my button, but as I don’t have unique id, I’m filtering it using my “button state”.

But it is removing everything in my list.
I can figure out how to set up the constraint to make it work…
Do you have any idea?

My goal is to not create additional database.

Thank you in advance for your help :slight_smile:

Hi Nigel,
Thank you for your advice, I apply it and I think I will go that direction it is much easier to manage.
However, could you please help me with one last thing ? I would like to save the final output list in one case of my database when one button “send” is clicked. But I can’t figure out how to set it up.

it would appear like following in the database:
Customer
Name / Pear, Apple/

When the button “send” is clicked
-> Create a new thing
-> Type : Customer

  • add name
  • add ListOfFruits (What should be its type : List of text ? List of Fruits?)

and then, ListOfFruits add …?

I’m lost I tried a few things but it wasn’t sucessfull.

Thank you in advance for your help and your time :slight_smile:

I have added an example of Saving these lists on the link above.

1 Like

Thank you for your help.
Is there a way to save the FruitList not in numbers but in real Fruit names in the database directly?

I’m facing an other issue now, with the :last item / : first item functionality.
If I want to display only the last fruitlist added nothing is displayed… I don’t understand why. My guess is I am not using the last item tool correctly…
Sorry for the inconvenience

Yes, you could make your repeating group a list of texts, and then have your list to be a list of texts.

Not sure about the “list item” question - if you could share a link to a public app it will be a lot easier to help :slight_smile:

Hi Nigel,

I don’t understand which repeating group should be a list of text …?

Here is my app : https://bubble.io/page?version=test&type=page&name=list_save&id=essai123456&tab=tabs-1

as you can see in front of name I would like to display the last name registered with the last “Toxicity” List Registered…

Thanks for helping

Hi Nigel !
Thank you once again very much for your help !!!
I find out that there is in the database a little search engine near the datafield and you can choose how you want to display them : unique Id, Name, Anything !

Do you have access to my app this time ?
I don’t know how the public app are working, and what you can have access to.
If not, here is the live demo : https://essai123456.bubbleapps.io/version-test/list_save?debug_mode=true

regards,
lise

Hi Lise,

Yes, I now have access and will have a look for you.

I have rejigged the page a little.

So I read in the “last” Productinfo in the Group, then use the Parent Group to show the name, and then drill down on the Toxicity.

That is a simpler way than putting a repeating group inside a repeating group.

Thank you Very Much Nigel that was really helpfull !

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