Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Patching a Combo box with 2 fields

Posted on by 4
Hi All,
 
I have something that I'm stumped by.
 
I have a Combobox that shows 2 fields (a surname and a first name, which are based on 2 lookup fields in Sharepoint).  Is there any way to Patch or otherwise submit the choice made in the combobox to 2 Sharepoint Lookup Fields?
 
 
 
//Code getting an error, obviously
Patch('SharePoint List Name',Defaults('SharePoint List Name'),{LUSurname:ComboBox1.SelectedItems})
 
 
So, for example, I pick an item from the Combobox that is "Surname Field: Smith" and "First Name Field: John". How do I separate these so that when somebody selects "Smith, John" in the combo box, the Sharepoint list's Surname lookup patches to "Smith" and the First name lookup patches to "John"?
 
Apologies if this is unclear in any way, happy to answer any follow-ups. 
 
 
  • Verified answer
    jpespena Profile Picture
    jpespena 264 on at
    Patching a Combo box with 2 fields
    Hi,
     
    Update the Items property of the combobox to:
     
    AddColumns('DataSource', CustomName, $"{LastName}, {FirstName}")
     
    Then change the Value property dropdown in the properties to CustomName.

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,297

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,890

Leaderboard