Hey,
I have a gallery that updates a Collection every time I change a value, and I have a button (Submit button) that Patches all the data to a Dataverse table.
The problem is that, when I click the Submit button to patch the data, it updates all the columns in Dataverse, changing the 'Modified on' and 'Modified by' columns.
This is the event that updates the Collection:
If(
ThisItem.'#001_UserList_Project1' in col_UserUpdates.'#001_UserList_Project1',
Update(
col_UserUpdates,
LookUp(
col_UserUpdates,
'#001_UserList_Project1' = ThisItem.'#001_UserList_Project1'
),
{
Country: If(drp_Country.Selected.Value <> Blank(), drp_Country.Selected.Value, ThisItem.Country),
FullName: If(txt_FullName.Text <> Blank(), txt_FullName.Text, ThisItem.FullName),
StartDate: If(dte_StartDate.SelectedDate <> Blank(), dte_StartDate.SelectedDate, ThisItem.StartDate),
Notes: If(txt_Notes.Text <> Blank(), txt_Notes.Text, ThisItem.Notes),
'#001_UserList_Project1': ThisItem.'#001_UserList_Project1'
}
),
Collect(
col_UserUpdates,
{
Country: drp_Country.Selected.Value,
FullName: txt_FullName.Text,
StartDate: dte_StartDate.SelectedDate,
Notes: txt_Notes.Text,
'#001_UserList_Project1': ThisItem.'#001_UserList_Project1'
}
)
)
And this is the Submit button code:
Patch(
'#001_UserList_Project1',
col_UserUpdates
);
ClearCollect(
col_UserUpdates,
'#001_UserList_Project1',
);
Notify(
"Records saved!",
NotificationType.Success,
2000
)
Does any one know, how to bulk update but at the same time just Patch the items modified?