Send emails based on matching reference value

I'm building a class scheduling and management application with student registration functionality. One of the features that I am trying to incorporate is that when a class is cancelled, an automated email notification bot sends an email to any/all students that are registered for that class to notify them of the cancellation.

I have 2 tables:

  • Table 1: Class Manager - Has columns with [CLASS NAME], [CLASS STATUS] (i.e., "Active", "Cancelled") and other class information 
  • Table 2: Student Registrations - Has columns with students' [SELECTED CLASS CHOICE], [REGISTRATION STATUS] (i.e.,  "Approved", "Denied"), [EMAIL] address, and other student info.

 

I'm trying to make bot that...

IF

[CLASS STATUS] is changed to "Cancelled"

THEN

Email all student registrants' whose:

  1. [REGISTRATION STATUS] = "Approved"
  2. [SELECTED CLASS CHOICE] = [CLASS NAME] that was cancelled

The expression that I am trying to use in the "To:" field of the "Send an Email" task settings is a SELECT() expression like this:

SELECT(  Student Registrations[EMAIL]  , 

     AND(

               Student Registrations[SELECTED CLASS]  =  Class Manager[CLASS NAME]  ,

               Student Registrations[REGISTRATION STATUS] = "Approved"  )   , 

               FALSE )

 

I have tried many different expressions and combinations and Googling. Help!

0 8 243
8 REPLIES 8
Top Labels in this Space