Jump to content
  • 0

[SOLVED] Copy and Delete Record From One Table To Another



I swear, all I have to do to solve a problem is ask for help on here. I figured it out. I edited my delete trigger and took out the conditions, besides the matching ID. This seems to be working fine. 


Hey all. I've got two tables. One is Orders_Table, the other is CompletedOrders table.

There are two types of records going into the Orders_Table. They either have a set quantity or a bulk quantity. In regards to that, there are 3 fields that are related. Qty_Ordered, Qty_Received, and Bulk_Received. The workflow I am trying to get is when a record in Orders_Table either has Qty Received updated to equal Qty_Ordered, or Bulk_Received is updated to true, that record is copied over to the CompletedOrders table and deleted from the Orders_Table.




Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
16 minutes ago, MayMusic said:

I tried and it did not work for me either, have you tried to use IF THEN block?

Hey May, here is the updated triggers that worked for me. The record gets inserted into the 2nd table once the conditions are met, and the trigger on the 2nd table deletes the record with the same ID in the 1st table.




Link to comment
Share on other sites

  • 0
10 hours ago, RuisiHansamu said:

May  I know if that trigger configuration is both in the 2nd Table

Sorry @RuisiHansamu. I took this app through a major overhaul not too long ago and do not have the workflow above anymore. I just checked to see if I saved those old triggers... it looks like they were in different triggers but I am not certain. I have one for Insert, Update that has the 2nd trigger image from above. However, I do not have any triggers that have the 1st trigger image of the delete block anymore.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...