Hello,
I’m trying to do something ‘simple’, but I can’t make my logic match Bubble’s logic. Hoping for any advice that can help me solve this.
I have a data type ‘organization.’ Each organization has a field type ‘website’, which is a list. (Think of a blogger business where there are multiple websites.)
I want the organization’s admin to be able to edit/delete websites.
To display websites, I use this expression:

That is convoluted, imho, but that’s the only way I seem to be able to populate this repeating group. At least I see the list of websites.

I want to add an option to delete a website. I watched videos from other users on YouTube, and I don’t see similar options to delete a thing in my app. When I try add a workflow to the ‘trash can’ icon using the same expression as listing websites, I get this message:

“Delete text…: To delete should be anything saveable but right now it’s a text.”

Each website IS a ‘text’ in the database, so… :face_with_spiral_eyes:

I tried ‘delete a thing’, ‘delete a list of things,’ and ‘make changes to a list’. Each time, the expression is red and asks for (More…) to be added.

What am I missing here?

Getting really frustrated with this learning/building process. Any help is appreciated.

Thanks in advance.

  1. Create a datatype called ‘Website’
  2. Create a field under Website called ‘Organization’ and set it to type Organization. Everytime a new Website is created, set the Organization to the relevant Organization.
  3. On the repeating group data source, do a search for Website where Organization is the relevant Organization (you can grab the Organization from the URL or parent group or anywhere).
  4. Now when you click the trash icon, select delete a thing and thing to delete is current cell’s website.
1 Like

You can try this!

1 Like

Thanks @autom8 for the quick reply.
I tried this, but it turns out that I would need remove the ‘Website’ field from under ‘Organization’ data type, and recreate under 'Website field type. Otherwise, it doesn’t display correctly in other places. That will mean I need to rebuild a few components as well.
Does this suggest that, in order to manipulate list data in Bubble, it needs to be its own data type, and not field that is a list?

Thank you, @cyril.legaspi!
This worked like a charm… I just had to remove a group container inside the repeating group to make the final ‘remove parent text’ click.
Awesome. I didn’t realize that there was a group that broke the parent/child relationship there. Great lesson. thanks again :pray:

1 Like

Its the more efficient way of doing it, specially with the new WU pricing, you want to avoid list fields on datatypes.

1 Like

This is great info. Efficiency is important. I will consider rebuilding some sections in this app.
I will try to avoid using lists in the future.
Thank you very much.

1 Like