Recycle bin feature

 

Before I dive into this. I would like to ask the community if this is even achievable in AppSheet. I would like to make a feature that every deleted row from any table goes into a table call recycle bin. From this recycle bin table, rows will be:

-Recovered by pressing an action ( rows will be put back to their original table.

- Rows will be deleted forever after 30 days.

Solved Solved
0 13 410
3 ACCEPTED SOLUTIONS

I have an idea. Don't know if it helps. Anyway just posting it here.

Instead of creating another table called recycle bin, you can add an extra column to the same table say DELETE_STATUS. This column may not be shown. 

Now normally this column will be blank for all rows. Now you can create an action button say RECYCLE to add a value say current date using TODAY().

Now you can create 2 slices of the original table. One having all rows with blank DELETE_STATUS column. Other slice with all rows having non-blank DELETE_STATUS column. 

First slice can be used as original table and second one as Recycle Bin. 

Now for restoring from Recycle Bin you can create another Action button say RESTORE which will make the column DELETE_STATUS blank again thereby showing in the original table and gets removed from Recycle Bin..

Now for the last part i.e. to delete rows after 30 days from recycle bin, you can create a scheduled BOT to run everyday to run DELETE action on rows having DELETE_STATUS < (TODAY ()-30).

View solution in original post

You can create MENUS and Sub-menus easily in APPSHEET itself. I have done it this way. 

I created a sheet with all the view names say [View_Names] in appsheet for the sub-menu. Then when i click any row in this table which contains the different views of sub-menu, i used the action go to another view within the app using LINKTOVIEW([View_Names]) to navigate to the different sub-menus from the main menu. 

View solution in original post

You can create a table like the e.g. below with a Card View showing only the VIEW Column

jyothis_m_0-1662964542944.png

Here [View] is the name you want to display in the APP as sub-menu 

[View Name] is the actual name of the view in the APP

Then you can create an ACTION given below

jyothis_m_1-1662964731272.png

Finally in the UX --> VIEWS make a view for the above table and select the EVENT ACTION when ROW SELECTED as the above created ACTION

jyothis_m_2-1662964845956.png

Its DONE!  Now when you click any item in the table, the ACTION get executed and it will navigate to the corresponding VIEW

 

 

View solution in original post

13 REPLIES 13

I have an idea. Don't know if it helps. Anyway just posting it here.

Instead of creating another table called recycle bin, you can add an extra column to the same table say DELETE_STATUS. This column may not be shown. 

Now normally this column will be blank for all rows. Now you can create an action button say RECYCLE to add a value say current date using TODAY().

Now you can create 2 slices of the original table. One having all rows with blank DELETE_STATUS column. Other slice with all rows having non-blank DELETE_STATUS column. 

First slice can be used as original table and second one as Recycle Bin. 

Now for restoring from Recycle Bin you can create another Action button say RESTORE which will make the column DELETE_STATUS blank again thereby showing in the original table and gets removed from Recycle Bin..

Now for the last part i.e. to delete rows after 30 days from recycle bin, you can create a scheduled BOT to run everyday to run DELETE action on rows having DELETE_STATUS < (TODAY ()-30).

@jyothis_m this is a very smart way of looking at it. I like this idea. I will implement it tonight and will let you know how it goes. Thank you for your help!

@jyothis_m I'm working on your solution right now. One disadvantage to this solution is that i will have one recycle bin slice for each table in my app and right now i have 15+ tables, therefore i will need 15+ slices, one for each one of my tables correct? This means that i will have 15 different places in my app to recover files from, correct?

Correct. That is surely a disadvantage.

If I can have all those different views to recover files from as sub menus inside the Menu views I think this could work very nice. Could this be done using App Scripts?

MENUS

You can create MENUS and Sub-menus easily in APPSHEET itself. I have done it this way. 

I created a sheet with all the view names say [View_Names] in appsheet for the sub-menu. Then when i click any row in this table which contains the different views of sub-menu, i used the action go to another view within the app using LINKTOVIEW([View_Names]) to navigate to the different sub-menus from the main menu. 

This sounds very interesting. let me give it a try!!. 

What type of rows are you using? Also, how do you use the action go to another view within the app using LINKTOVIEW([View_Names]) to navigate to the different sub-menus from the main menu. Can you give me an example.

You can create a table like the e.g. below with a Card View showing only the VIEW Column

jyothis_m_0-1662964542944.png

Here [View] is the name you want to display in the APP as sub-menu 

[View Name] is the actual name of the view in the APP

Then you can create an ACTION given below

jyothis_m_1-1662964731272.png

Finally in the UX --> VIEWS make a view for the above table and select the EVENT ACTION when ROW SELECTED as the above created ACTION

jyothis_m_2-1662964845956.png

Its DONE!  Now when you click any item in the table, the ACTION get executed and it will navigate to the corresponding VIEW

 

 

@jyothis_m  Simply genius! wow This is amazing! it's working flawlessly. I was working all night until 3am without any luck. thank you so much. I like how straight forward are your explanations. Recycle bin โœ… !!!!! 

Thank you @casitasrd . Happy that it helped you. Thanks to the community. 

You could run a app script function that would catch the deleted data from app sheet and append that data to I assume to a sheet ( table ) that you are referring to. Let me know if you would like a sample.

Please. An example would be great @jrice 

Top Labels in this Space