Patch(
'Project database',
LookUp('Project database', 'Project name' = Dropdown_ProjectName.Selected.'Project name'),
{
'Team_composition': ForAll(DataCardValue_TeamMembers.SelectedItems,
{
Claims: "i:0#.f|membership|" & ThisRecord.Email,
Department: ThisRecord.Department,
DisplayName: ThisRecord.DisplayName,
Email: ThisRecord.Email,
JobTitle: ThisRecord.JobTitle,
Picture: ThisRecord.Picture
}),
'Countries': ForAll(
DataCardValue_Countries.SelectedItems,
{
Id: ThisRecord.Id,
Value: ThisRecord.Value
}
),
'Budget_percentage': Value(DataCardValue_BudgetPercentage.Text) / 100
}
);
If(
// check if there were any errors when the test score was submitted
!IsEmpty(Errors('Project database')),
// if true, show any error message
Notify(
Concat(
Errors('Project database'),
"Column: " & Column & ", Message: " & Message
),
NotificationType.Error
),
// else, reset form fields and how success message
Notify(
"Record successfully updated.",
NotificationType.Success
);
Reset(Dropdown_ProjectName);
);