web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch combobox with lo...
Power Apps
Answered

Patch combobox with lookup field column in SharePoint list

(0) ShareShare
ReportReport
Posted on by 48

Hi everyone,


We're using a combobox ('combobox_1') with values based on a lookupcolumn ('Category') in a SharePoint List ('VRT_WS_Artikels'). We want to patch the chosen values in the Sharepoint list, but it doesn't seem to work for us.

 

We have this:

 

Patch(
VRT_WS_Artikels;
Defaults(VRT_WS_Artikels);
{Title: Txt_Productnaam.Text;
Leverancier:Txt_Leverancier.Text;
'Link website':Txt_linkwebsite.Text;
Kleur:Txt_kleur.Text;
Foto:Med_artikelfoto.Image;
'Enkel voor ENG':If(Togg_ENG.Value=true;{Value: "Ja"};{Value:"Neen"});
Beschikbaar:If(Tog_kledijbeschikbaar.Value=true;{Value:"Ja"};{Value:"Neen"});
Categorie:{ID:LookUp(VRT_WS_Categorie; 'Naam categorie'=ComboBox1.Selected.ID);Value:ComboBox1.Selected.Value}
}
)

Everything works except for the 'Categorie', which is the lookupfield ofcourse.

 

Thanks in advance for the help!

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,732 Most Valuable Professional on at

    Hi @AB_ ,

    Firstly try this

    Patch(
     VRT_WS_Artikels;
     Defaults(VRT_WS_Artikels);
     {
     Title: Txt_Productnaam.Text;
     Leverancier: Txt_Leverancier.Text;
     'Link website': Txt_linkwebsite.Text;
     Kleur: Txt_kleur.Text;
     Foto: Med_artikelfoto.Image;
     'Enkel voor ENG': 
     {
     Value:
     If(
     Togg_ENG.Value;
     "Ja";
     "Neen"
     )
     };
     Beschikbaar:
     {
     Value:
     If(
     Tog_kledijbeschikbaar.Value;
     "Ja";
     "Neen"
     )
     };
     Categorie:
     {
     Id:
     LookUp(
     VRT_WS_Categorie; 
     'Naam categorie' = ComboBox1.Selected.Value
     ).ID;
     Value:ComboBox1.Selected.Value
     }
     }
    )

    Also consider why you are using Lookup columns at all unless you need them directly in SharePoint Edit in Grid View - I have never found the need.

     

    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, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • AB-18111337-0 Profile Picture
    48 on at

    This seems to work, thank you!

     

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 330

#3
Mohsin Ali Profile Picture

Mohsin Ali 232

Last 30 days Overall leaderboard