Jump to content
  • 0

Insert New Line Trigger Freezing Page


pmcfarlain

Question

I created this trigger so that when I insert a new line into this table, it automatically creates a matching line in another table (if the unit type is not "FREIGHT" or "OTHER"). For some reason, it ran perfectly the first time I added a new line but now when I enable it and try to add a new line to my table, it freezes the page and does not allow me to add a new line to the original table.  The page turns unresponsive. Here is my trigger. Can anyone help me identify the issue?

Screen Shot 2021-06-22 at 1.46.59 PM.png

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 1

That's strange. That happens when there is an indefinite loop in the Trigger, but, yours is very simple.

What I noticed, though, is you are using Run Actions on insert, you have to SELECT from #inserted instead of tbl_ggl_job_lines, as the #inserted stores the new records.

Maybe try other browsers, does it still freeze, as well?

Link to comment
Share on other sites

  • 0
6 minutes ago, TellMeWhy said:

That's strange. That happens when there is an indefinite loop in the Trigger, but, yours is very simple.

What I noticed, though, is you are using Run Actions on insert, you have to SELECT from #inserted instead of tbl_ggl_job_lines, as the #inserted stores the new records.

Maybe try other browsers, does it still freeze, as well?

Just changed to #inserted, now I'm encountering this error.

 

Screen Shot 2021-06-22 at 2.19.52 PM.png

Screen Shot 2021-06-22 at 2.22.44 PM.png

Link to comment
Share on other sites

  • 0

Figured out part of the issue (some logical errors with a connected table) so now it's not running into any errors but it's also not doing what it's supposed to do. The idea between the full outer join was to get the records in which there are no matching line numbers so that I can create a new matching line number in the other table. 

Tested it out with outer, inner, and left join but its not doing anything.

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