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

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Error in Patching

(0) ShareShare
ReportReport
Posted on by
Hi. I have a "Employee Involved" dropdown, I want that when I edit it and add person it will patch successfully. But the scenario is I need to remove the previous value first and then re-select again the persons to be able for patching to be successful.




 
EmployeeInvolved: If(
                CountRows(employeeInvolvedComboBox_2.SelectedItems) <> CountRows(varEditConcern.EmployeeInvolved) || !IsEmpty(
                    Filter(
                        employeeInvolvedComboBox_2.SelectedItems,
                        IsBlank(
                            LookUp(
                                varEditConcern.EmployeeInvolved,
                                DisplayName = DisplayName
                            )
                        )
                    )
                ),
                ForAll(
                    employeeInvolvedComboBox_2.SelectedItems,
                    {
                        '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpanderUser",
                        Claims: "i:0#.f|membership|" & Lower(Mail),
                        DepartmentOfInvolved: Department,
                        DisplayName: DisplayName,
                        Email: Lower(Mail),
                        JobTitle: JobTitle,
                        Picture: "."
                    }
                ),
                varEditConcern.EmployeeInvolved// Retain previous values if no new selection or no change
            )
           


 
I have the same question (0)
  • Suggested answer
    Nandit Profile Picture
    1,568 Moderator on at
    Error in Patching
     
    Is there a reason why you are removing the values from your Combobox first before adding new persons? Is that a requirement?
     
    Also what is the Items property of your Combobox?

    I have created a Combobox in my Test app and tried to build something similar - 
     
    Items property of the Combobox (Cmb1):
    Choices(DataSource.EmployeeInvolved)
    DefaultSelectedItems:
    varEditConcern.EmployeeInvolved
     
    Patch Button (Can also use the OnChange property)
    Patch(
        DataSource,
        varEditConcern, // the selected record
        {EmployeeInvolved: Cmb1.SelectedItems}
    )
    I have also added a Reset button to go back to the default values:
    Reset(Cmb1)
    This is how it looks and it works perfectly. 
     
    Hope this helps. 
     
    Kind regards, 
    Nandit

    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
  • Nandit Profile Picture
    1,568 Moderator on at
    Error in Patching
    Hi,

    Following up to check if you were able to solve this issue using my suggestion?

    Kind regards,
    Nandit

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 652 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 410 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 236

Last 30 days Overall leaderboard