How to remove item from middle or RepeatingGroup data

I have a RepeatingGroup (list) of items.

The data is sourced from an external API. It is not from the Bubble DB.

In each cell, of the RG, I would like to be able to delete that item.

That means deleting from the middle of the list that the RG is holding. After the delete, the RG will have N-1 items.

How can I do that?

Because the data is being taken from the API, please tell me about the data type of each item?
If it is text, you can use find and replace (you can also get help from regex) and find the section and replace it with blank.

it comes out of the API response as JSON. Then I assign to the RG, where it is a list of objects.

I want to delete object N in the RG’s list.

I don’t think the details of the object matter here, but here it is in case I’m missing something:

addOns {
  _id
  upc 
  error
  name
  artist
  type
  imageUrl
  description
  price
  creationDate
  inventoryLevel
  quantity
}

In summary: The RG has a List of Addons. I want to delete (from the RG) one of the items in the middle.

1 Like

Hi there, @gaharrington… here is something you can try. I assume you have to click a button or an icon or whatever to delete an object in the repeating group. So, when the button/icon is clicked, run a workflow with the Display list action, and display a list that is the RepeatingGroup's List of Objects:minus item Current cell's Object.

I don’t pretend to know much about displaying data directly from an API in a repeating group, but what I described works when the data is coming from Bubble’s database, so I’m thinking it should work in your case, too. If it doesn’t, well, all you lost was a few minutes giving it a shot, eh?

Hope this helps.

Best…
Mike

I just made a plugin to work with JSON, I think it can help you, the plugin has many features and maybe solves even more of this challenge.
Demo:
JSON Assistant

If you like, you can give me your application’s ID so that I can revoke your app for free. Even if you want another feature, I can add it.

@mikeloc Thank you! I didn’t know about the :minus feature! :grimacing::joy_cat:

@NoCodeDataArtisan I will check out your plugin! At first glance, the demo site looks really pro and useful!

2 Likes

Sure, no problem!
Thank you for your kind response.

If you ever have any questions or need any help, please don’t hesitate to ask me. I’m here to assist you in any way I can.

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