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 SelectI...
Power Apps
Answered

Patch ComboBox SelectItems no longer working

(0) ShareShare
ReportReport
Posted on by 54

hi,

initial approach to PATCH ComboBox SelectedItems worked until I used the FIRST function to load values 

in the ComboBox 'DefaultSelectedItems' from a SharePoint List PeoplePicker field 

 

rcapone_2-1700156120581.png

the initial approach to PATCH still works as needed when the ComboBox is populated vie user input

 

ComboBox_BusinessApproverEmail section PATCH works as required (ComboBox is being populated via UI).  

 

ComboBox_FinanceApproverEmail section PATCH now shows as error (ComboBox is being populated from SharePoint PeoplePicker field using FIRST function shown above ).  

 

rcapone_0-1700155999134.png

 

thanks in advance!

RC

 

 

Categories:
  • MudassarSZ365 Profile Picture
    591 on at

    Hi @rcapone ,

    try this

    Patch(
     YourDataSource,
     Defaults(YourDataSource),
     {
     // Other fields to patch
     BusinessApproverEmail: ComboBox_BusinessApproverEmail.Selected.Email, // Assuming BusinessApproverEmail is a single person field
    
     // For FinanceApproverEmail from PeoplePicker field
     FinanceApproverEmail: First(ComboBox_FinanceApproverEmail.Selected).Email
     }
    )

    If you provide more details or error messages, I can assist you further. If you find this solution helpful, please consider accepting it. 😊

  • rcapone Profile Picture
    54 on at

    hi MudassarSZ365,

    BusinessApproverEmail is multi-person Combobox that is being patched to a SharePoint PeoplePicker field

     

    here is the full Patch statement that had been working until I populated the FinanceApproverEmail Combobox using the FIRST function

     

    here is the full PATCH code

    -------------------------------------------------------------------

    ClearCollect(
    colSharePointNewItem,
    Patch(
    spFinance_List,
    Defaults(spFinance_List),
    {
    Title: FlowParm7_UserFilename,
    Business_Requestor:
    {
    Claims: User().Email,
    Department: "",
    DisplayName:User().FullName,
    Email:User().Email,
    JobTitle: "",
    Picture: ""
    },

    Business_Approver: ForAll(ComboBox_BusinessApproverEmail.SelectedItems,
    {
    Claims: ThisRecord.Mail,
    Department: "",
    DisplayName:User().FullName,
    Email:User().Email,
    JobTitle: "",
    Picture: ""
    }
    ),


    Finance_Approver:ForAll(ComboBox_FinanceApproverEmail.SelectedItems,
    {
    Claims: ThisRecord.mail,
    Department: "",
    DisplayName:User().FullName,
    Email:User().Email,
    JobTitle: "",
    Picture: ""
    }
    ),


    CC_Users:ForAll(ComboBox_CCeMail.SelectedItems,
    {
    Claims: ThisRecord.Mail,
    Department: "",
    DisplayName:User().FullName,
    Email:User().Email,
    JobTitle: "",
    Picture: ""
    }
    ),

    FileNameTempale_Uploaded: FlowParm6_UserFilenameExt,
    NumberAttachments_Uploaded: varNumberOfAttachments,
    Comments: TextInput_Comments.Text,

    'Created Date': Today()

    }
    )
    );

    -------------------------------------------------------------------

  • rcapone Profile Picture
    54 on at

    here is the error message

     

    rcapone_0-1700163201665.png

     

  • v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @rcapone,

    Do you set all the people picker Items property with Choices() function?

     

    If you populate the ComboBox_FinanceApproverEmail with Choices(), you can see that the returned table including the following fields like DisplayName, Email, JobTitle

    vqiaqimsft_0-1700196218140.png

    Please check the fields of your ComboBox_FinanceApproverEmail, refer to the correct field name.

  • rcapone Profile Picture
    54 on at

    hi Qi,

    confirming, I am using Choices() in ComboBox_FinanceApproverEmail.Item

     

    rcapone_1-1700232225276.png

     

    First() and Filter() in ComboBox_FinanceApproverEmail.DefaultSelectedItems

    rcapone_2-1700232333726.png

     

    Note:

    the Patch had been working until I changed the DefaultSelectedItems to uses First() with Filter (on SharePointList)  and Items to uses Choices.  Initially, it had been using a collection which I had populated via code to contain Joe Blow and Sue Flew email addresses

     

    thanks for your help on this, please advise

    RC

  • Verified answer
    rcapone Profile Picture
    54 on at

    I found what was causing the issue - when I changed Claims to be mapped to ThisRecord.Email instead of ThisRecord.mail (which ComboBox_FinanceApproverEmail was previously using and is still used for Patching to the ComboBox_BusinessApproverEmail PeoplePicker field) 

     

    rcapone_3-1700233759627.png

     not sure why this worked, hope someone can shed some light on this 

     

    regards,

    RC

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 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard