Jump to content
  • 1

Adding a second record for the same ID to a Table using a Trigger


Question

I am trying to add via an Insert trigger a second row of data, based on the first row of data which is inserted by a trigger associated with another table.

The Awards table has an start date and end date of the project, and on insert creates the first milestone in a Milestone table,  based on the entered start and end dates for the Award.

On insert of the first milestone, I would like to add (if at all possible) a second milestone if the remaining period for the period is bigger than 12 months (which is calculated in a formula field in the first record).

I get a "Triggered Action cannot be enabled because it exceeds maximum nested level of 1" Error message.

Any help appreciated

 

Trigger Action to add 2nd Milestone.JPG

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Howdy Vander.  I would suggest adding the InsertAction shown here as a second action of the awards table trigger.  This way you aren't cascading triggers, it's all done in one place.

Question, are you trying the Milestones to the Awards?  If yes that might create some challenges but there are solutions for that also.  I hope that helps.

Link to post
Share on other sites
  • 0

Thanks Brasovan,

your comment put me in the right direction.

I have created a multi-step trigger on the Awards table which generates the financial milestones for up to 6 years, and any shorter period in between, based on a set of IF statements and a calculated value of the next financial year end (and start of the next one); the budgets are attributed based on the total award divided by the  number of months of the project duration.

Link to post
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...