Deleting entries from a list

Hi, I’m relatively new on bubble and I’m trying to keep a list of telephone numbers as a list field for clients.

The type of the object is at_client and the field is called clienttel.

I’ve created a single input and an add button that makes changes to this field, adding the phone that user provided and clearing the inputs. The adding part is working fine.

The problem is, to show those numbers, I’ve created a repeating group and the data source to it is the field clienttel. It’s showing it perfectly but I wanted to put an trash icon beside each entry on repeating group that would let the user delete that entry like below:

Screen Shot 03-01-20 at 01.00 PM

My problem is that when I try to set the workflow for this trash icon, I don’t get parents group at_client as a thing to change…the nearest I get is current page at_client, and I haven’t build the pages to have an single item so it won’t work.

Screen Shot 03-01-20 at 01.02 PM

I’ts been hard to find out a solution but I can feel I’m missing something basic… :laughing:

Can anyone help?

I don’t know if that’s right but I guess that’s the link to view the editor:

Just go to POPUP VIEW/EDIT CLIENT

hey Diogo,

The thing here is that you’re calling for an action “Make changes to a thing”, while a “number” is not a Thing (DB Object).

What you need to try to edit is the Object (in your case, “at_client” object if I understand correctly), then specify that you want to remove the element of the list of numbers that is equal to the value of the current cell (of type number).

Let me know if that helps :+1:

1 Like

Yeah, I could state that but the repeating group to show those phones doesn’t work if I use the object “at_client” as source…it needs to be number to work correctly.

The repeating group is set up fine - you don’t need to change the type.

You just need to pick the right object to edit in the workflow that you are invoking from clicking the trash can, then delete the number from Current Cell from the list of numbers within that object field.

OK? :slight_smile:

So, I should be making change to a thing “At_client” and change the field clienttel, right?

Yes, assuming that field Clienttel is a List of Numbers, I think it should be intuitive from this point :wink:

It is a list of numbers…but that’s the problem…

since the trash can is inside a repeating group cell of type number, it doesn’t show me the option to make change to a thing of type at_client unless I change the entire repeating group type too.

It should be something like - Modify At_Client object’s field clieenttel, and set the new value of that field to current value of that field without the number equal to the current cell number.

Makes sense?

Yes, but how could I do it if I can’t even select the correct thing to change? (as you can see in the picture on the post)

You can. Your Popup (Parent Group) is referring to a single correct object you want to edit at_client.

So edit it :slight_smile:

Just to reiterate:

  • You are not changing the Number entry.
  • You are changing the at_client object, and you are modifying the value of one of it’s fields, not the other way around.

Yeah, I should be able to use parent group’s at_client as thing to change…but that’s exactly what I’m telling you… :laughing:

I can’t select that as thing to change…and I presume that’s because the trash can is inside a repeating group that doesn’t even have at_client as type

Just take a look at that picture of a menu in the post and you’ll understand.

Yes you can.
Just look at the place where you are storing your at_client object.

It’s right here, right?

2 Likes

Humm, I can reffer to the object of the parent group like that? I mean, calling the parent group itself and then getting it’s object?

You can refer whatever you want if it’s in the list of available references :slight_smile:

Try it out :sunglasses:

1 Like

Hoo, now I get it…I was looking for the “preset option” Parent group’s at_client and since it doesn’t appear to me I wasn’t aware that I could select the entire popup and get it’s at_client refference.

Seems like it’s working :slight_smile:

Thank you.

(btw, I’ve used tasky from u guys to start learning and trying out bubble and it’s awesome. I’m trying to make some improvements as a learining experience and maybe buy one of the other templates you have in the future to start a real MVP)

1 Like

Praise the Lord!

You’re welcome.

Yes, you definitely need to make A LOT of mistakes and discoveries for yourself for this to be more of a smooth sail.

Glad our templates help you do that :sunglasses:
Much luck on your project!

:rofl: :rofl: :rofl:

Thank you and great job :slight_smile:

1 Like

I was having this same problem and sorted me out.

Thanks.