Jump to content
  • 0

Triggered action can't access change that triggered it?


Mitch

Question

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:

image.png.a5fc6dfffb9a9a671ec493857b8864fb.png

Target table BEFORE edit is:

image.png.b9e3896aba8b362b02cffa033c9d7478.png

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:

image.png.45422cd4e621fcf223b1144561435574.png

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

image.png.80f4db02309aa380899e753c1bde09d9.png

The resulting tbl_Target does NOT reflect the edit:

image.png.cc59f9287fd6318cb51500c2a3e886bd.png

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

image.png.37f606391363dab733b0d714ea3ee061.png

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

image.png.8485b1dc0f445eb5122fc961ddba81e8.png

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.

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