How do I create a list of email addresses from a comma spelled name list?
The Users table contains the user’s name and email address columns.
The Report form has an EnumList created from the Name column in the Users table, but when AppSheet sends an email, it must be an email address, not a name.
I tried the following formula, but it could only LOOKUP the first email address.
SPLIT (LOOKUP ([name], “Users”, “name”, “mail”), “,”)
Solved! Go to Solution.
LOOKUP can only operate on single row and will return only a single value of the column from that row.
You need an expression that returns a list of emails gathered from different rows where the “name” in those rows is contained in your EnumList of names. A SELECT() expression can help and It would look something like this:
SELECT(Users[mail], IN([Name], [_THISROW].[EnumList of Names Column]))
Just replace “EnumList of Names Column” with the actual name of the EnumList column. Also, its not clear WHERE in your app you are using this expression. It’s possible there might need to be some slight adjustment based on that context.
Give it a try and let us know.
User | Count |
---|---|
18 | |
10 | |
8 | |
6 | |
5 |