Hi Everyone,
I have a local collection ("localColl) that is populated from the SharePoint list and I have set this as a DataSource to the Gallery. I am adding a new item using the below code:
Patch(
localColl,
Defaults(localColl),
{
'Name (Title)': "New Project",
Status: {Value: "Enable"}
}
)
The above code adds the record in the bottom of the Gallery. But I need to make this add the record at the first index of the Gallery as there will be more items in the Gallery.
Previously, I had set the SharePoint list as the DataSource directly to the Gallery and in that case, I achieved it using the Sort function. But since there are more records, there is a time delay when adding the item and then sorting and refreshing the DataSource (like it takes around 4secs for the records to appear after refreshing).
Also since its a New item that is getting added, I am storing it in the local collection and then I am adding it to the SharePoint list only when the Save button is clicked by the user. So can anyone please help me out here to add the new record in the top of the local collection such that Gallery displays it in the first poisition.
So can an