To achieve this, follow these steps:
-
Utilize the ForAll function to iterate through each row of your collection.
-
Use the Patch function to either create new rows in your SharePoint list or update existing rows. Ensure that you map each column in your collection to the correct column in your SharePoint list.
ClearCollect(colYourCollection, galYourGallery.AllItems); //Initiate your collection
ForAll(
colYourCollection As item, //can also directly reference your gallery with galYourGallery.AllItems
Patch(
'SharePointList', //your datasource
//Choose if adding new rows vs updating existing rows
If(
IsBlank(item.ID),
Defaults('SharePointList'), //new Item
LookUp(
'SharePointList',
ID = item.ID
) //existing item lookup
),
{
Title: item.Title,
'Reviewer Status': item.Status.Value,
'Reviewer Date': item.ReviewerDate,
Comments: item.Comments
}
)
);
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers!
Rick Hurt