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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch function - patch...
Power Apps
Unanswered

Patch function - patch people selected in a combo box to multi-person SharePoint column

(0) ShareShare
ReportReport
Posted on by 70

I've got a combo box in my app with Items property:

 

 

Office365Users.SearchUser({searchTerm:'Expense Approvers ComboBox'.SearchText}).DisplayName

 

 

I'm using a Patch function in the OnSelect of a button to patch into a SharePoint List. My function is like that:

 

 

Patch('Travel Expenses',Defaults('Travel Expenses'),
{Title: 'Expense Title Input'.Text,
'Travel Date': 'Expense Date Picker'.SelectedDate,
Cost: Value('Expense Cost Input'.Text),
Approvers: 'Expense Approvers ComboBox'.SelectedItems
}
)

 

 I've tested the formula and it all works fine if I leave the last line (Approvers: xxx) outside. 'Approvers' is a multi-person SharePoint Column in my dataset

 

Looking at this article:

https://www.matthewdevaney.com/power-apps-patch-function-examples-for-every-sharepoint-column-type/patch-a-sharepoint-person-column-with-multiple-people-in-power-apps/

 

and watching this Shane Young video:

https://www.youtube.com/watch?v=b4Fb57UsJLI

 

I was under the impression my function would work ok, but it is producing an error.

 

Any thoughts what's the fix?

Categories:
I have the same question (0)
  • Mitchelvdh Profile Picture
    6 on at

    According to your first article, it must be something like this (change the static values, ofcourse):

    Patch('Travel Expenses',Defaults('Travel Expenses'),
    {Title: 'Expense Title Input'.Text,
    'Travel Date': 'Expense Date Picker'.SelectedDate,
    Cost: Value('Expense Cost Input'.Text),
    Approvers: {
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims: "i:0#.f|membership|djohnson@companyname.com",
     Department: "Technology",
     DisplayName: "David Johnson",
     Email: "djohnson@companyname",
     JobTitle: "",
     Picture: ""
     }
    }
    )

     

  • AntDim Profile Picture
    70 on at

    Hi Mitchelvdh, thanks for your comment.

     

    Hm, I don't think so because if you scroll down the article in the section with the combobox, you'll see this formula being used (screenshot attached). I was trying to make this formula work as it's simpler, plus your suggested formula above includes static values for email etc. which I do not know how to make dynamic in my case (which is what I need)

     

    AntDim_0-1685454674135.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard