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 text field to Curr...
Power Apps
Answered

Set text field to CurrentUser when Status drop-down changes to Resolved

(0) ShareShare
ReportReport
Posted on by 601

Hello, I'm trying to introduce the logic mentioned in the title of the post and having some difficulty with the formula. I would like to set the value of a text field "Resolved by TM" to the current users display name whenever a "Status" drop-down field is equal to "Resolved" else, if "Status" is equal to "Open", "Resolved by TM" should be blank. My current formula looks like this:

 

If(DataCardValue13="Resolved", DataCardValue37="CurrentUser", DataCardValue376="") 

 

Any help would be greatly appreciated!

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    You can store the current user record in the OnStart property of the app with something like this:

    Set(currUser, User().Name)

    Or do a lookup and store the display name in a variable.

    Then use something like this:
    If(DataCardValue13="Resolved", DataCardValue37= currUser, DataCardValue376="")

    Or if the variable stores the entire record, then use:

    currUser.Name or currUser.'Display Name'

    Let me know if this helps.

    ---
    If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

    Thanks!
    Hardit Bhatia
    The Power Addict
    https://thepoweraddict.com
  • Verified answer
    WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Hi @CarlHRVA ,

    I will call the status drop down Status - substitute it for your drop down name.

    I have also used the built-in user name function.

    The default of the text box should be as below and you would need to reset it to populate it with this value.

    If(
     Status.Selected.Value="Resolved",
     User().FullName,
     Status.Selected.Value="Open",
     ""
    )
    
    

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more.

  • CarlHRVA Profile Picture
    601 on at

    This works! Thank you so much!

  • CarlHRVA Profile Picture
    601 on at

    @PowerAddict Thank you for your thoughtful reply. I tried what seemed like the easier route provided by Warren and it worked but I really do appreciate you taking the time to answer my question.

  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at
    The reply from @WarrenBelz is definitely detailed out well.

    Just one suggestion, there might be needs to use the same user record again in the app and if you keep calling the User() function in say a filter expression, it will lead to delegation issues. So as a best practice, you should store the current user in a variable.

    Thanks,
    Hardit Bhatia
    https://thepoweraddict.com
  • WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    Totally agree with @PowerAddict - I do it on every app.

    I just did not want to complicate this one more than I already had.

  • CarlHRVA Profile Picture
    601 on at

    @PowerAddict @WarrenBelz Thank you both very much. I've been able to use the same formula but substitute the currUser variable for the User()FullName and it works as expected

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 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard