cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IzzyWizz
Resolver I
Resolver I

Patch a field from a collection based on a different field from the same collection chosen from a dropdown

Hi,

I have a dropdown which is populated from a collection which has two fields, name and email. I populate the dropdown with the following in Items:

ResponsiblePersonList.Name

But, I then want to Patch the Email of the person chosen in the dropdown rather than the Name.

Can anyone help with the code for ' patch the email of the person whose name is chosen in the dropdown'?

I wondered if it was something I could do using LookUp but am stuck at how to get it to pick a field rather than the whole record which is what I think this is doing:

ResponsiblePersonEmail: LookUp(
   ResponsiblePersonList,
   Name = ResponsiblePersonDropdown.Selected.Name
),

Thanks,

Izzy.

 

One day hoping to be good enough at PowerApps to pay back for all the help I get on the forum by helping someone else!

1 ACCEPTED SOLUTION

Accepted Solutions
AsanKani
Skilled Sharer
Skilled Sharer

Hi, @IzzyWizz 
You are move is almost right. But you are missing result value

ResponsiblePersonEmail: LookUp(
   ResponsiblePersonList,
   Name = ResponsiblePersonDropdown.Selected.Name, Mail
),

You are missing Email / Mail in lookup. You can try above code.

Please click Accept as solution 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 or you liked the post and want to show some appreciation, please give it a Thumbs Up.

View solution in original post

3 REPLIES 3
AsanKani
Skilled Sharer
Skilled Sharer

Hi, @IzzyWizz 
You are move is almost right. But you are missing result value

ResponsiblePersonEmail: LookUp(
   ResponsiblePersonList,
   Name = ResponsiblePersonDropdown.Selected.Name, Mail
),

You are missing Email / Mail in lookup. You can try above code.

Please click Accept as solution 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 or you liked the post and want to show some appreciation, please give it a Thumbs Up.

Hi @AsanKani ,

Perfect, thank you!

Izzy.

Hi @IzzyWizz 
you are welcome 😌

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (1,676)