Jump to content
  • 0

Change End Dates


Question

I have a table who's population are a number of memberships with a "Start_Date" and "End_Date".

I would like to run a trigger that renews the memberships "End_Date " with todays date using a timestamp when the membership field "renew" is set and updated to "YES".

Following this an automated email is triggered to email the members "Email_Address" when the renew is set to "Yes" with the new "End_Date".

I have tried doing this with a trigger in the same table but have a level 2 error and understand that update can be triggered in the same table.

Does anyone have a work around for this.

 

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Thanks for the response BaySunshine....I have the trigger working whereby I insert records into a different table and then bring them back into the original table with the trigger on it....However the email section of the trigger is not working???? Thanks for your help....

See below screen shot of the trigger...

Screen Shot 2018-07-11 at 12.56.52 pm.png

Link to post
Share on other sites
  • 0

Hi @Scott,

In the Email block, change the table name from ABGCMembershipCoporate to Inserted. For the update trigger, change one of the fields in Inner Join to RenewalsTable.MemertsiopGUID. Right now it is joining only on its own record. So, the update will happen always whether or not it matches with GUID field from RenewalsTable or not.

I hope this helps.

Regards,

 

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