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 Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,115)