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 / Patch to a lookup column
Power Apps
Unanswered

Patch to a lookup column

(0) ShareShare
ReportReport
Posted on by 59

I created a custom button in my command bar that opens up a new form with no fields defaulted. I want one field "Device Name" to have the value of the device that was selected from a gallery. I tried using this formula 

 

AmariBarino_0-1657201456939.png

 

 and a few variations of this but I cannot get the value to patch to this field. 

 

AmariBarino_0-1657200837161.png

Does anyone have any experience with this or know if this is actually possible?

 

Thanks in advance for any help. 

I have the same question (0)
  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @AmariBarino ,

     

    Have you reviewed the following (https://powerusers.microsoft.com/t5/Building-Power-Apps/Patch-with-Lookup-field-and-Dataverse/td-p/822995) 

     

    Patch(
    
     'Reservations',
    
     Defaults('Reservations'),
    
     {
    
     Name: "Product Reservation",
    
     Reservation: LookUp(
    
     Products,
    
     'Device Name' = "Dell Laptop"
    
     )
     }
    )

     

    Looks pretty similar to your situation so I updated above to match.  Let me know if this helps.

  • AmariBarino Profile Picture
    59 on at

    Thank you for your response Drew! Unfortunately this did not work for me. I don't know if I provided the correct information but this is the link I used when adding navigation to my custom button in a model driven app command bar. There is a powerfx formula to navigate to a new form with a field defaulted and that works if I use a regular text field. It just doesn't respond when I try to patch to a lookup field. 

  • mando643 Profile Picture
    26 on at

    Did you ever figure out a way to do this. Currently having the same issue.

  • AmariBarino Profile Picture
    59 on at

    Unfortunately not; I am going to assume that as of right now this is not possible to do. 

  • mando643 Profile Picture
    26 on at

    I had a work around. If you call "Self.Selected.Item.FieldName" it will return the GUID of the lookup. I created a field to store it then did a lookup through the flow on submission. I hid the GUID field in the form which is just a text field. Then you match that GUID to the lookup column in flow and it assign the lookup for you.  

  • AmariBarino Profile Picture
    59 on at

    Oh, nice job! Where did you place the Self.Selected.Item.FieldName in your formula? 

  • mando643 Profile Picture
    26 on at

    Yes on the onSelect of the formula bar in the command bar for that button. It looked like this - 

    Navigate(
    Patch(Defaults('Project Task Copies'), {  'Project GUID': Self.Selected.Item.Project, Division: Self.Selected.Item.Division}))

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 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard