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 / PowerFX custom command...
Power Apps
Answered

PowerFX custom command bar using User() not working

(1) ShareShare
ReportReport
Posted on by 237

I have been creating several custom buttons in a model driven app and they work great.

Now I want to capture the current user who pushed the button but it looks like User().email or User().fullname do not give any result. 

Also hiding the button if the current user is not the record owner doesn't work, because of User()  is empty

How do I determine the current user from the command bar execution? 

 

To 'debug' the issue I patch the record that I'm on to see the value that is received

Mglat_0-1695562922775.png

 

I have the same question (0)
  • Verified answer
    v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Mglat ,

     

    Because User() function is not supported currently.s

    vxiaochenmsft_0-1695606415780.png

    https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/commanding-use-powerfx#functions-not-supported

     

    Best Regards,

    Wearsky

     

  • Marcel Lathouwers Profile Picture
    237 on at

    @v-xiaochen-msft That is a great explanation why that doesn't work 😊

     

    Any suggestion how we can build a PowerFX formula that checks on the current user? For instance, check if the current user is the owner of the record

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Vote for the idea here 🙂 https://ideas.powerapps.com/d365community/idea/ffb7f338-241a-4302-9b9b-24ae5c40de2b

  • Dominik Stalzer | primeone Profile Picture
    71 on at
    I'm currently struggling with the same problem:
    I can't compare the currently logged-in user with the record owner.
    Has anyone found an alternative solution?
     
    The unsupported User()-function is giving me a headache.
    I voted for the suggested Idea.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard