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
and a few variations of this but I cannot get the value to patch to this field.
Does anyone have any experience with this or know if this is actually possible?
Thanks in advance for any help.
Yes on the onSelect of the formula bar in the command bar for that button. It looked like this -
Oh, nice job! Where did you place the Self.Selected.Item.FieldName in your formula?
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.
Unfortunately not; I am going to assume that as of right now this is not possible to do.
Did you ever figure out a way to do this. Currently having the same issue.
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.
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.
stampcoin
17
mmbr1606
15
Super User 2025 Season 1
ankit_singhal
11
Super User 2025 Season 1