Grab email values based on associated name

Hello I'm having a hard time grabbing an email from an associated name from one table and then placing that value in another table.  Here was my attempt: SELECT(USERS[Email],IN([Employee],Users[Employee Name])).

It tells me Y for the IN function part, but doesn't grab the associated email value from the employee name even with the matched pairings.  Data Breakdown:

Users table with columns Email, First Name, and Last Name as real columns and then a virtual column Employee Name, which concatenates those two values together. This is a form view so that users can enter in this information.

Projects table with Employee column where I used type Enum, which created a dropdown list of the employee userbase. Now I had created a real column called Employee Email and wanted the value to be automatically entered based on what email the employee listed with their name from the Users table. 

However it hasn't worked at all and I don't understand what I'm doing wrong. Help would be appreciated, thanks

0 5 152
5 REPLIES 5

Even an example would be far more beneficial to me than trying to make sense of 4 different links. I'm just not getting this unfortunately 

How about converting this sentence: If Assignment[Employee] = Users[Employee Name] then set [Employee Email] in the Assignments table equal to the Email ID found in the same row as defined by [Employee Name], which both are from the Users table. 

I don't follow where or how you're trying to populate the retrieved email value(s). Nonetheless, in case it's helpful, keep in mind that the SELECT function returns a table--even if it's just one column with one row. Potentially, what you need is to wrap your SELECT function within another function like ANY or INDEX to extract just the value from the desired cell.

Your SELECT expression is useless; in addition to that it returns a list not a single value, it will just always match and will give you all emails in the table. You need to dedicate time to study how expressions work and know what could you expect from them. If you aren't willing to read just 4 guides you will not able to make a functioning app. A friendly advice.

In the Projects table, your Employee column should be a ref to the Users table, while in the Users table you should make your "Employee Name" column as Label. Finally to retrieve the email, you won't need to use a SELECT statement; you should use a dereference expression instead, like: [Employee].[Email]. That's all.

Please read the articles Marc provided you in the first comment.

 

Top Labels in this Space