USEREMAIL() is only returns the creator email address

Iโ€™m making a table where Iโ€™m trying to record the users email address when they create a record. Iโ€™ve done this by just putting USEREMAIL() into the formula for the column. However no matter which which user account creates a new record it always returns the user email as being the creator email. Iโ€™ve used the exact same thing in a different table and it works just fine. I cant work out why its doing this but not in the other table.

Solved Solved
0 4 152
1 ACCEPTED SOLUTION

In my experience sometimes the ANY() function is a bit temperamental. I prefer the LOOKUP() function.

Your ANY() expression could look like this: LOOKUP(USEREMAIL(), โ€œUser Tableโ€, โ€œUser Emailโ€, โ€œUser Departmentโ€)

This should look for the users email in the user table and the user email column, and give you back their department.

Before continuing check your column types to make sure that the types are set to the correct values. make sure that the [User Email] column is type email. I also linked the LOOKUP() function for you just so it is easier to navigate to.

If you are still having trouble I can try my very best to help, but I would ask for a couple of screenshots of your columns and the expression you are trying to use that way I can be as productive as possible.

Craig
QREW Technologies

LOOKUP()

View solution in original post

4 REPLIES 4

Hello, the first thing I would check is go to the data menu and then the columns tab. Be sure that the column you are working with has the USEREMAIL() as the formula and not just the initial value. Check to make sure that the formula is what you want it to be because the app formula overwrites anything else in the initial value section. If that still is not working then you can try previewing the app as a different user by looking at the bottom right and changing the โ€œpreview app asโ€ field to test.

Craig
QREW Technologies

Ahh okay. So the reason it wasnโ€™t working was because it was a virtual column. Changing it to an actual column then returns the correct email. However it is still an issue. Iโ€™m trying to make a formula to return the users โ€œDepartmentโ€ from a โ€œUser Tableโ€ when they submit a new record.

User Table Fields:
ID
User Email
User Department

Iโ€™ve set up User Table such that only 1 record for each email can be created and it is all working correctly and providing the right email addresses for each user.

The in the separate table I am trying to reference the users department with this formula
ANY(SELECT(User Table[User Department], USEREMAIL() = [User Email]))

However as previously mentioned it will only return the department that is associated with the creator and not the one of the current user.

In my experience sometimes the ANY() function is a bit temperamental. I prefer the LOOKUP() function.

Your ANY() expression could look like this: LOOKUP(USEREMAIL(), โ€œUser Tableโ€, โ€œUser Emailโ€, โ€œUser Departmentโ€)

This should look for the users email in the user table and the user email column, and give you back their department.

Before continuing check your column types to make sure that the types are set to the correct values. make sure that the [User Email] column is type email. I also linked the LOOKUP() function for you just so it is easier to navigate to.

If you are still having trouble I can try my very best to help, but I would ask for a couple of screenshots of your columns and the expression you are trying to use that way I can be as productive as possible.

Craig
QREW Technologies

LOOKUP()

Amazing, its working now. Thanks for your help

Tim

Top Labels in this Space