
Hi,
I am trying to patch a value from a combo box to a SharePoint list of a data type Person. But in my combo box, there are two sets of items one is a record and the other is a table. which works based on condition. So now I need to write a patch statement to hit the combo box value irrespective of the data set to a column of person field in Sharepoint. Please do help me out with this.
This is the patch statement I tried
Patch(
);
Hello @Anonymous,
You have to put this formula for IsSearchable property of your combobox:
If(
Approval_edit=false,false, true)
Also,
you can directly use only Approval_edit as value because it is boolean only like below screenshot.
Then, You have to use the condition as below in your items property(your screenshot) as below:
If(
Approval_edit=false,
Office365users.SearchUser({
searchTerm:(Lookup(VarSharepointResponselist,'Response ID'=Gallery1.selected.'Response ID',
'Gatekeeper Approver(s)'.Email))),
Office365users.SearchUser({
searchTerm:cmb_GateKeeper.SearchText,
Top:20
})
)your Patch function(No need to put Table into it):
Patch(
'DRU Response Management',
{
'LOB Approver(s)':
{
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
Claims: cmb_LOB.Selected.Mail,
DisplayName: cmb_LOB.Selected.Mail,
Email: cmb_LOB.Selected.Mail,
Department: "",
Picture: "",
JobTitle: ""
}
}
);