
I have a PowerApp that uses SharePoint as a datasource. One of the fields in the SharePoint list is a People Picker field. I would like to filter the field in the app to select employees from a specific department. The filter is working, the field gets updated in the SharePoint list, but when I view any records, the name doesn't appear in the field on the PowerApp screen. The details listed below are what I am using, as described in another post.
Item Property of the combo box:
Filter(
Office365Users.SearchUser({searchTerm: violation_IssuedBy.SearchText, top:999}),
"Community Development" in Department
)
Update property of the datacard:
{
Claims: "i:0#.f|membership|" & Lower(violation_IssuedBy.Selected.Mail),
DisplayName: violation_IssuedBy.Selected.DisplayName,
Email: violation_IssuedBy.Selected.Mail,
Department: "",
JobTitle: "",
Picture: ""
}
DefaultSelectedItems of the combo box:
LookUp(Office365Users.SearchUser(),DisplayName = ThisItem.IssuedBy.DisplayName)
I think the DefaultSelectedItems is where it falls apart, because the people picker field is filtered, the right data is written to the SharePoint list, but I can't see the data when looking at the record in my app.
Any suggestions?
Hi @AnnetteM ,
Try using below options in DefaultSelectedItems property -
1. ThisItem.IssuedBy
2.
{
Claims: "i:0#.f|membership|" & Lower(ThisItem.IssuedBy.Email),
DisplayName: ThisItem.IssuedBy.DisplayName,
Mail: ThisItem.IssuedBy.Email,
Department: "",
JobTitle: "",
Picture: ""
}