Delete a whole row records with reference to other data.

I am making an inventory management app in AppSheet using Google Sheets. Through this, I wanted to manage my inventory which consists of machines and types of equipment. Some people come and take it for use. So I want to manage it. The first sheet's name is "Inventory" and contains all the materials that are present. There are three columns "Material, Serial No. of material and image. Suppose my inventory contains three Red LEDs they will have different serial numbers each. That is why I have entered them separately. I have done this with several other materials. The second sheet name is "Issued Items" and contains the data of the person who is issuing the materials. The table contains five columns "Date And Time, Person Name, Material, Serial no. and Image". The user only has to enter the name of the person in the app and select the material from the dropdown while issuing, for other columns I have referenced it to the 1st table from where the serial no. and image of the material will automatically get entered. Now I want that when a material is issued it should get deleted from the 1st sheet i.e. sheet where all the materials are listed. How can I achieve it?

0 6 80
6 REPLIES 6

One way is to do that with an automation Bot and action. When the row is added, it triggers the Bot and because you know the material ID, it can find it and delete it with an action.

I created an event when a new record is added to the release table... and created a new action Auto Delete, other than system generated delete action. Under the behavior section of Auto Delete, I have given the condition IN(Inventory[Serial Number], Issued Items[Serial Number]).
The bot is running without any error but still, the record is not getting deleted.

vedsahu_0-1710485925456.png

 

Would you please show the Bot setup. When doing it with the "Adds" Bot, you would not need to have any condition rule with the delete action. It's either that or the Bot doesn't find that record to delete.

vedsahu_1-1710566018068.png

 

The thing is when I am creating an event, that event is for a table "Issued Items"  when the record is created. But the action it is showing is also of the same table. I need it to show the actions of the original table so that I can use the delete action of the original table.

 

Don't know what is the reason for the "Release" table, but you need to trigger the Bot from the "Issued items" table with "Adds". To find a correct record from the "Materials" table, you need to use "Execute an action on a set of rows". The Ref list needs to have the correct key column value so it can find it. I assume the "Serial no." is the key column in Material table. You can write it then like LIST([Serial no.]) because you have that column also in the "Issued items" table. And then finally select the system generated Delete action to make the deletion.

What this does.. 
#1 - The app user adds the new "Issued item"
#2 - It triggers the "Adds" bot
#3 - It search the correct row from the "Materials" table with the key
#4 - It deletes the "Material" record.

The release table is needed as I want to keep track of what materials have been issued.
I followed the above steps to create an automation. And it run without any errors but the record did not get deleted.

vedsahu_0-1710742194870.png

Below is the column details of my tables
1:- Material Table(Shelf 2)

vedsahu_1-1710742280968.png

2: Release Table

vedsahu_2-1710742361037.png

This is the bot details:

vedsahu_3-1710742459140.png

 

Top Labels in this Space