Hi
I have 2 Comboboxes and a button on a screen.
Both ComboBoxes pull a list of managers from a Person Field in a sharepoint list using:
ComboBox2:
Distinct('LTS Leave Approvers'.Primary, Primary.DisplayName)
ComboBox2_1:
Distinct('LTS Leave Approvers'.Primary, Primary.DisplayName)
I would like to add code to the button which checks a different sharepoint list for any entries where the Person in ComboBox2 is listed in the "Approvers" Person field, and where the "ApprovalStatus" choice field is "Awaiting Approval." Then for all entries that meet these requirements, add the person from ComboBox2_1 to the "DelegatedApprovers" Person field.
Here's the code that I'm currently using:
ForAll(
Filter(
'Holiday Request Tool',
Approver.DisplayName = ComboBox2.Selected.DisplayName && ApprovalStatus = "Awaiting Approval"
),
Patch(
'Holiday Request Tool',
LookUp(
'Holiday Request Tool',
ID = Current.ID
),
{
'DelegatedApprover': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: "i:0#.f|membership|" & ComboBox2_1.Selected.Mail,
Department: "",
DisplayName: ComboBox2_1.Selected.DisplayName,
Email: ComboBox2_1.Selected.Mail,
JobTitle: "",
Picture: ""
}
}
)
)
The error shows Incompatible types for comparison. Can anyone help please?
Thanks,