Delete a row after calling LINKTOFORM()

So let me begin by painting my setup.

I am tracking book sales, I have an โ€œInventoryโ€ table, a โ€œSold Booksโ€ table and a โ€œSale Dataโ€ table.

I have an action to โ€œMark Book as Soldโ€ . This does two things:

  1. Copy the row from โ€œInventoryโ€ to โ€œSold booksโ€
  2. Calls โ€œLINKTOFORM(โ€œSheet1_Formโ€,โ€œBooks Soldโ€,[Key])โ€ to copy the key of the sold book to the sales data row.

I would also like a third thing to happen which is to remove the original row from โ€œInventoryโ€. I have tried to make an action to do this however step 2 seems to interrupt it. I cannot call the deletion before the LINKTOFORM() action as that means I can never copy the key.

Is there any other way to achieve this?

I considered the possibility of copying from โ€œInventoryโ€ to โ€œSold Booksโ€ after a new row is added in โ€œSales Dataโ€ but I cannot figure this out. They all have the same BookID key so it should be possible to reference it but I cannot figure out how.

Solved Solved
0 4 303
1 ACCEPTED SOLUTION

View solution in original post

4 REPLIES 4

Steve
Platinum 4
Platinum 4

If a grouped action contains a navigation action (e.g., that uses LINKTOFORM()), no actions after the navigation action will be performed.

Why are you navigating to Sheet1_Form? Does the user need to interact with the form at all?

Yeah so the sales data is added (price, marketplace etc) to the Sales Data sheet. The sales data sheet refers to the key of the item in Sold Books for info about said sold book.

This is a little different to most sales trackings because this is always one item is one entry as these are antiques so even the same title will have differences - mainly the condition of it.

Is there a way to call certain actions after a specific form is saved?

Maybe I can make another action bundle to copy from โ€œInventoryโ€ to โ€œSold Booksโ€ and delete the original row in โ€œInventoryโ€ after Form1 is saved in โ€œSales Dataโ€

Ah coolio, the same thing that I am doing but piggybacking off the save function on a chosen form.

Good stuff Steve, appreciate it!

Top Labels in this Space