Issue: Unable to Patch SharePoint Site with both LookUp values AND Attachments. Only one, or the other works, but not both.
Everything in the code below, works to Patch my Lookup fields in SharePoint from the PowerApps Form:
SharePointIntegation > OnSave
Patch('SPList',
Defaults('SPLIst'),
Column1: textbox.Text,
Column2: textbox.Text,
Column3: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: combobox1.Selected.ID,
Value: combobox2.Selected.Title
},
Column4: {
'@odata.type': #Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: ddVehicle.Selected.Id,
Value: ddVehicle.Selected.Value
},
);
ResetForm(SharePointForm1);
RequestHide()
I found this thread here, and the suggestion worked to add the attachments to the SharePoint item BUT, now the LookUp columns are empty:
SharePointForm1.Updates
Here is the final version of the code I'm using
Patch('SPList',
Defaults('SPLIst'),
Column1: textbox.Text,
Column2: textbox.Text,
Column3: {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: combobox1.Selected.ID,
Value: combobox2.Selected.Title
},
Column4: {
'@odata.type': #Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id: ddVehicle.Selected.Id,
Value: ddVehicle.Selected.Value
},
SharePointForm1.Updates
);
ResetForm(SharePointForm1);
RequestHide()