Delete All Record

Can We Just create a button in the main UX view (Like "Deck" interface) like this :
and connect the Delete action with this button  

AbdullaNsour_0-1706526581658.png

Thanks for any advice ๐Ÿซก

Solved Solved
0 7 183
1 ACCEPTED SOLUTION

This can be done with the way @AbdullaNsour recuested within one table. It only needs one additional column if you don't have any column that you could use for this purpose already. It's only needed for triggering the Bot. And if you want, you can use another table to do that as well.

You need to use "go to an another view within this app" action something like this.. 

AleksiAlkio_0-1706564340426.png

In this case, the action is using the first row from this table and it's specified with that row's key value. Though you can use ANY() for this purpose and then it will find the first record and it updates that row. It doesn't matter what is the row you update.

Then the Bot is triggered and with the "Run a data action" like this.. 

AleksiAlkio_1-1706564518006.png

It will take 5..10 seconds to delete 500 rows and when it's completed, it refreshes the view.

 

View solution in original post

7 REPLIES 7

JSO
Silver 2
Silver 2

If you check the selection box:

JSO_2-1706527456669.png

You can select multiple records.

JSO_3-1706527546774.png

click on the three dots on the right

JSO_5-1706527669409.png

Common options will appear that you can execute and among them delete if it is one of them.
When clicked it will apply to all selected ones.

JSO_6-1706527706790.png

 

 

 

 

 

 

 

thank you but i need to delete more than 500 record when the status = finish which is this way don't work 

You can try this, through an action:
1-Make sure the table allows deletions.
2-Create DeleteThis action in table, of type: Data:delete this row
3-Create a DeleteAll action in the table, of type: Data: execute an action on a set of row. In Reference Rows write the ID column of the table. Something like Trucks[TruckID] (it will depend on the table). In your case, make a filter with the condition you want.
Be sure to check Need confirmation?, for security.
4-When you press that button, the data will be deleted locally and little by little in the Physical Table.

Note:

Maybe it's faster to do something similar through automation. The AppSheet Server will handle the bulk execution and return the updated data to you. I think he won't do it one by one and that may be faster.

You can create an action button and then use a Bot to delete those rows either with Bot/Actions or Bot/Webhook. 

From that view, you wouldn't be able to add an action to delete the records in the way you describe. If you don't need the records as soon as they are marked finished, you could add a security filter on the table that is just the condition [Status]<>"Finish". It would take a second for the security filter to catch up, but it'll hide away anything marked "Finish". This would hide away the data but you'd still have it in the back end for review / recovery, instead of deleting it outright.

If your app is deployed, you could also do a scheduled bot that deletes records marked "Finish".

If you need to control when it's deleted you could create a helper table as an actions menu, with a record for deleting all finished orders. When you trigger that action, it can run an action on a set of rows as "Delete" with the condition of [Status]="Finish"

This can be done with the way @AbdullaNsour recuested within one table. It only needs one additional column if you don't have any column that you could use for this purpose already. It's only needed for triggering the Bot. And if you want, you can use another table to do that as well.

You need to use "go to an another view within this app" action something like this.. 

AleksiAlkio_0-1706564340426.png

In this case, the action is using the first row from this table and it's specified with that row's key value. Though you can use ANY() for this purpose and then it will find the first record and it updates that row. It doesn't matter what is the row you update.

Then the Bot is triggered and with the "Run a data action" like this.. 

AleksiAlkio_1-1706564518006.png

It will take 5..10 seconds to delete 500 rows and when it's completed, it refreshes the view.

 

Yes @AleksiAlkio  This is what I need 
what I did :

AbdullaNsour_0-1706600723081.pngAbdullaNsour_1-1706600735183.pngAbdullaNsour_2-1706600760267.png

then create Automation when just Update with expression :

 

SELECT(order[Order_ID], AND([Status] = [_THISROW].[Status], [_THISROW].[Status].[Status] = "Finish"))

 

 

AbdullaNsour_3-1706601050511.png

Referenced rows :

 

SELECT(order[Order_ID], AND([Status] = [_THISROW].[Status], [_THISROW].[Status].[Status] = "Finish"))

 

Top Labels in this Space