Jump to content
  • 0

Copying from one table to another


kpcollier

Question

I have two tables, Bid Table and Est Table.

The Bid Table holds every bid our company has. It includes a BidID number, Project Name, Contractor ID, Date created, etc

The Est Table is currently empty

I want it so every time I enter new data into the Bid Table, it automatically copies the same BidID, Project Name, Date created, etc, over to the Est Table.

I have a triggered action that runs actions on insert data event, INSERT into Est Table with all of the fields I wish to be copied over.

I have the BidID set as an integer for the Est Table.
 

As it is now, when I create new data in the Bid Table, a new entry is created in the Est Table, but none of the fields are filled out and the BidID is wrong (it just counts one up from the previous entry in Est Table, not the same BidID from the Bid Table).

Untitled.png

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Thank you, @luna! I greatly appreciate it. I'm still learning with these triggers.

I have another question, if you could please help. Is there a way I can set up a trigger so that if I update a specific field in an entry I can have the entire entry copied into a new table?

Now I have it so the new entries into the old table are copied into the new table. Now, I want it so if I update the name of project in the old table, the entire entry is copied to the new table. But only for that field. I don't want it to copy if I update any other field besides Project_Name.

Edited by kpcollier
Link to comment
Share on other sites

  • 0

Hi @kpcollier ,

 

May I know how are you going to insert a new record when Project_Name is updated?

I suggest that you add another field from your old table which handles the old Project_Name. This is to test if the inserted Project_Name is not equal to the old Project_Name, then a new record is inserted to the other table.

Please refer to the Triggered Action I created for your reference.

InsertWhenUpdate.PNG.69a2e8f991cd5690b4c7a85eb464df7a.PNG

 

Hope this helps.

 

Regards,

kristina 

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.

Guest
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.

Loading...
×
×
  • Create New...