So I make the form on PowerApps to update data to the item list SharePoint.
I want to the submit button wil be updated the data on item list sharepoint without making or adding a new data. The data that i have input is "Mechanic Name" or "Nama Mekanik", "Grade" on my language with choice type for all, and "Branch" or "Cabang on my language. The form on powerapps is shown the column that will be input by mechanic, such as "Mechanic's ID" or "ID Mekanik" with single text type, "Enter Time" or "Tanggal Masuk" with date time type, "Spesialisasi 1", "Spesialisasi 2", and "Spesialisasi 3" with choice type. I input the syntax on submit button like below, but always error with these description fom co-pilot:
Description Error:
The expression is intended to perform multiple actions when a button is clicked. It is trying to patch a record with default values, notify the user with a success message, submit a form, run a flow, reset the form, and navigate to a different screen.
The errors in the expression are:
1. Invalid argument type (Control) - The 'Defaults' function is expecting a data source as an argument, but it is receiving a control instead.
2. The function 'Defaults' has some invalid arguments - The arguments passed to the 'Defaults' function are not valid.
3. The function 'Patch' has some invalid arguments - The arguments passed to the 'Patch' function are not valid.
4. Invalid argument type (Control) - The 'Patch' function is expecting a record as an argument, but it is receiving a control instead.
The Syntax:
Patch( 'AddSpesialisasi',
Defaults('AddSpesialisasi'),
{
'ID Mekanik': DCIDMekanik.Text,
'Nama Mekanik': DCNamaMekanik.Selected.Value,
'Grade': DCGrade.Selected.Value,
'Cabang': DCCabang.Selected.Value,
'Tanggal Masuk': DCTanggalMasuk.SelectedDate,
'Spesialisasi 1': DCSpesialisasi1.Selected.Value,
'Spesialisasi 2': DCSpesialisasi2.Selected.Value,
'Spesialisasi 3': DCSpesialisasi3.Selected.Value
}
);
Notify("Data telah disimpan.", NotificationType.Success);
SubmitForm(TambahSpesialisasi);
AddSpesialisasiFlow.Run(TambahSpesialisasi.LastSubmit.ID);
ResetForm(TambahSpesialisasi);
Navigate(HomeScreen)
This is what my PowerApps look like:

This is what my SharePoint Look like:
