Saving data from PowerApps to SharePoint Lookup columns using Patch function

Patch function will be used to create one or more records in a data source.

Patch(
TestList,
Defaults(TestList),
{
Title: User().Email,
UserName: User().FullName,
UserLookUpColumn: {
‘@odata.type’: “#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference”,
Id: LookUp(
ParentList,
Title = myDropDown.Selected.Title,
ID
),
Value: myDropDown.Selected.Title
},
UserLookUpColumn1: {
‘@odata.type’: “#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference”,
Id: LookUp(
ParentList1,
Title = myDropDown1.Selected.Title,
ID
),
Value: myDropDown1.Selected.Title
},
myDropdown2: myDropDown2.Selected.Value
}
);

To fetch Logged-in User’s Email, Full name and saving dropdown list values from PowerApps to SharePoint List Lookup columns

Leave a comment