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
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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (6,146)