Lookup and return multiple values

I’m trying to dynamically populate the “to” field in an email by doing a lookup to another table. However, I could have multiple matching rows.

In other words, I have a Users table that has username, useremail, and userrole as columns. I want to get the email addresses from that table where userrole = “X”.

Is that possible?

Like this?

SELECT(
  Users[useremail],
  ([userrole] = "X")
)

See also:

1 Like