How to have one button delete MANY items?

Hello everyone,

I am building a news app and in the data base there are:

  1. Sources (New York Times, BBC, etc.)
  2. Articles (articles that are posted; each is assigned to a source)

A user can create a source of their own, and can delete their source if they want. I want a button that will delete a source AND all the articles assigned to it.

If anyone has any ideas on how to do this I’d be very appreciative!

Thank you
Ari

This willl be very easy according to your adtabase

Hey there @Ari

This is how you do it:

On the component where you want to delete the source + article, do not perform any delete actions. Link to a new screen and label the screen “Delete Articles”. On the new screen place a countdown timer and set it to 3 seconds. While the countdown timer is selected, click “make a list” in the settings of the component.

Set the list to Current Source > Articles like this:

Then go into the countdown timer settings and set an action to “Delete > Current Article”

Drag in another countdown timer and set it to sometimes visible if Current Source > Articles > Count is equal to 0. Set the timer to 2 seconds and the action to link back.

To make it look nice, you can set all of the countdown timer parameters to transparent.


Last, watch the status by adding a current source articles count within a text component.

Last thing to mention. On the 2nd countdown that links back, insert the action to “Delete > Current Source”

2 Likes

Hi @Ari,

In addition - there 2 videos might be useful for you:

Best,
Victor

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.