Jump to content
  • 0

Triggered action can't access change that triggered it?



Upon ANY change to Table1, I want to copy all the records in Table1 to Table2.  The problem I'm having is that the data I copy to Table2 from within the triggered action does NOT reflect the changes that fired the triggered action in the first place.   I understand that I have access to the #inserted and #deleted rows directly but that's not what I want.  I want to do a bulk update of Table2 that includes the changes to Table1 that fired the triggered action.  I can do this just fine with a Task but not from a triggered action.  

Am I missing something obvious?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Source table BEFORE edit is:


Target table BEFORE edit is:


Upon ANY change to tbl_Source, I want to delete all records from tbl_Target and rebuild to reflect the records in tbl_Source.  Triggered action is:


(As you can see, this simply "unpivots" columns in tbl_Source to rows in tbl_Target.)

 I then modify a record in tbl_Source as follows (added 100 to each Account 2 field).  


The resulting tbl_Target does NOT reflect the edit:


I then modify tbl_Target again (adding another 100 to the Account 2 record fields) as follows:


tbl_Target is rebuilt from the triggered action and only NOW reflects the first edit but NOT the second edit.  


I created a "Task" that does the same thing and if I run that that after an edit tbl_Target properly reflects the current edit.  But I can't run a task from a triggered action and the triggered action doesn't seem to have access to the edit that actually triggered the action. 

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