Jump to content
  • 0

Trigger to draw table from another table.


oliverk
 Share

Question

Hello

I am trying to get a trigger action to work. When a record is entered into a table, I need the trigger action to enter some data from another table.

I need the trigger action to enter data into three separate fields in the table "List_Stakeholders_Level2". For each field, it should find a field from it's parent-record in "List_Stakeholders_Level1". The parent record is identified as follows: the field "Stakeholder_parent_ID" in "List_Stakeholders_Level2" corresponds to the "Stakeholder_1_ID" in "List_Stakeholdres_Level1".

The trigger action is entering the data into the correct field. However it is entering blank data. Does anybody have any idea what I have done wrong?

Many thanks!

Oliver

Picture1.png

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I cant see your trigger. The picture is too small and it becomes blur when zoom out.

Anyway, If I got your inquiry correct, your intended setup is that when a record is inserted, it has to be updated with some values from different table. 

Is that right?

If thats the case, is the other table where you are pulling the records is the same? If yes, you can just join them to that table instead of using a select query per field.  That would work better and more optimized.

Another thing. If you are getting blank values, that means that the select block did not find any match, double check the 'where' statement or the actual value if they indeed matches. 

 

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

×
×
  • Create New...