cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jbjb247
Helper II
Helper II

Adding users email address to the excel data table

Hi 🙂

 

The user that is the last to update the record, I'm looking to add their email address to the data table so that we can see who made the last update.

 

This is the Patch code that I'm trying, but it isn't currently working:

 

Patch(Table2,ThisItem,{Updated By: User().Email})

 

But it isn't accepting this.

 

'Updated By' is the column header in the excel table, Table 2 is the excel table name.

 

Any help much appreciated, thank you 🙂 🙂

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@jbjb247 

Where are you seeing the error and what error?

First surround your Updated By with single quotes - 'Updated By'

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User
Super User

@jbjb247 

Where are you seeing the error and what error?

First surround your Updated By with single quotes - 'Updated By'

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Thats brill thanks. 

 

Really weird. I tried doing it without the User{}.Email first, just asking it to Patch with ordinary text (no single quotes around Updated By).

 

That worked fine. 

 

Soon as I swapped it to User().Email, it wouldn't work until there were single quotes put in.

 

Anyway, that works now - thank you 🙂

eka24
Super User
Super User

Edited. Solution already given

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,335)