Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
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. 

Categories:
  • mando643 Profile Picture
    26 on at
    Re: Patch to a lookup column

    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}))
  • AmariBarino Profile Picture
    59 on at
    Re: Patch to a lookup column

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

  • mando643 Profile Picture
    26 on at
    Re: Patch to a lookup column

    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
    Re: Patch to a lookup column

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

  • mando643 Profile Picture
    26 on at
    Re: Patch to a lookup column

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

  • AmariBarino Profile Picture
    59 on at
    Re: Patch to a lookup column

    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. 

  • Drew Poggemann Profile Picture
    9,278 Most Valuable Professional on at
    Re: Patch to a lookup column

    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.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics