web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Set function with User...
Power Apps
Answered

Set function with User().Email not working

(0) ShareShare
ReportReport
Posted on by 21

Anybody knows why the following isn't working:

 

In App on Onstart the following function:

 

Set(UserEmail,User().Email)

 

Doesnt set variable UserEmail. 

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Instead of OnStart try placing it in the OnVisible of the startign page like this 

    Set(userMail, User().Email)

     

    Possible it's just not firing off fast enough in the other for you

  • bramnaus Profile Picture
    21 on at

    Sadly this didn't work. Still got a code error. See Screenshot.

    SET function.png
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Works fine syntax wise see below.

    TheRobRush_0-1692282179872.png

     

    something causing this error, not how you wrote the line of code

    Hover over the red x and share it's full error message

     

  • rpersad Profile Picture
    831 on at

    Could be an issue with the Office365 connection. Try removing and adding back the connection.

  • TheRobRush Profile Picture
    11,128 Moderator on at

    User().Email does not run off that connector @rpersad 

  • bramnaus Profile Picture
    21 on at

    This is what the Error Details are:

    Unexpected characters. The formula contains Error while expecting ParenClose. This error occurs if, for example, a formula contains (Val@ 7) instead of (Val: 7). When you set a variable, the syntax requires a colon instead of an at sign.

    Very strange. Don't use an at sign in the syntax

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Are you maybe in a different region than U.S. and should write liek this or something?

    Set(userMail; User().Email)
    

     

    otherwise i would maybe create a new app, and test to see if you get same error

  • bramnaus Profile Picture
    21 on at

    Yes, i'm in the EU region. Why is there a difference. Doesnt make sense.

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Don't ask me, it drives me batty when answering questions here hahaha

     

    Assume other regions just have different coding standards and they don't want to confuse those people who have coded before

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 150 Super User 2026 Season 2

Last 30 days Overall leaderboard