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 / Auto-Assign to self
Power Apps
Answered

Auto-Assign to self

(0) ShareShare
ReportReport
Posted on by 557
Hello,
 
I am trying to create a button where when you select Auto-Assign the field "Assigned to" updates to the user that is logged in's email.  Any help would be greatly appreciated.  
 
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,494 Most Valuable Professional on at
    What is the Items of the Combo Box and is that a Classic or Modern control ? Also what is the name and type of field you are writing back to ?
  • joel914823 Profile Picture
    557 on at


    Hello @WarrenBelz  The Assigned To (in a form) is a people picker column within the SP list.  Within the Items property:
     
    Choices([@'Service Recovery Group'].'Assigned To:')




     
  • Suggested answer
    WarrenBelz Profile Picture
    154,494 Most Valuable Professional on at
    Put this in the DefaultSelectedItems
    {
        Claims: "i:0#.f|membership|" & Lower(User().Email),
        Department: "",
        DisplayName: User().FullName,
        Email: User().Email,
        JobTitle: "",
        Picture: ""
    }
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • joel914823 Profile Picture
    557 on at
    Thank you @WarrenBelz - Is there a way this happens only when I click on the Auto-Assign button?
  • Verified answer
    WarrenBelz Profile Picture
    154,494 Most Valuable Professional on at
    Hi @joel914823​​​​​​​
    Set a Variable OnSelect on the button
    UpdateContext({varAssign: true})
    then the DefaultSelectedItems
    If(
       varAssign,
       {
          Claims: "i:0#.f|membership|" & Lower(User().Email),
          Department: "",
          DisplayName: User().FullName,
          Email: User().Email,
          JobTitle: "",
          Picture: ""
       },
       ThisItem.'Assigned To'
    }
    
    also at the end of your save code and at screen OnVisible
    UpdateContext({varAssign: false})


    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
     

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 549 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 225 Super User 2026 Season 1

#3
Haque Profile Picture

Haque 224

Last 30 days Overall leaderboard