Jump to content
  • 0

Triggered action on update, checking on similar records with status 'active' and update other table.


Gilmay

Question

This is what I try to accomplish.  

A triggered action on update of the 'members' table, checks the same table ('members') for records having :

- the same e-mail address
- the status 'active'

If any record with the same e-mail address 'AND' status='active' is found, nothing has to be done.  If no records are found having both conditions true, the status in a second table 'Accounts' needs to be set to false.

In short: I want to disable the account when no more members with the same e-mail address are active.

Thank you for any input.

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I found my solution by using a variable.

First set the variable 'ActiveMembers' to 'False'.  Then check every record in my 'Members' table and if any record found that meets all requirements (= active member), set the variable to 'True'.

After that I check the 'ActiveMembers' variable and when still being "False", updated the 'Accounts' table accordingly to deactivate the related account.

 

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