To email expression returns a list--only want 1 person

I am having trouble with this expression.
I have an audit app. I have a workflow that fires whenever someone is OVERDUE on their audit.

I want one email to EACH person.

I use the following expression โ€œIf this is trueโ€ on a Send Email workflow: [Send_Overdue]=โ€œOverdue Email Neededโ€ There are a number of people who have overdue audits. This expression works as needed. Only those who are overdue are โ€œtrue.โ€

If I try either of these expressions in the โ€œTo [send email to these addresses]โ€ line, I have an issue.

SELECT(Send_Emails[email],[send_overdue]=[_THISROW].โ€œOverdue Email Neededโ€,TRUE)

That expression wants to send an email to EVERYONE who is overdue, not just the person on the row.
So the individual gets an email, but it also goes to EVERYONE.

lookup(โ€œOverdue Email Neededโ€, โ€œSend_Emailsโ€, โ€œSend_Overdueโ€,โ€œemailโ€)
This expression seems to do the same thing.

Basically, if there are 5 people overdue, I want 5 emails sent. 1 to each individual. As the two expressions work now, 5 emails are sent to 5 people. The one that SHOULD come to me goes to everyone.

0 2 276
2 REPLIES 2

Just so you can see both sets of expressions.

Thatโ€™s because SELECT() creates a LIST of things, and the logic for your formula says

  • pull all the [Email] values where [Send_Overdue] = โ€œOverdue Email Neededโ€
    So every record that matches that condition will be pulled.

I think the solution you need is to simply enter the column name that holds the email into the space where you have this select.

And inside the report, you should check the switch that says (For each row in the table)

Top Labels in this Space