// Store data in the context variable
UpdateContext({
submittedData: {
ClinicId: Value(TextInput3.Text),
ClinicName: TextInput2.Text,
Comments: TextInput1.Text,
CreatedOn: DatePicker3.SelectedDate
}
});
// Insert the data into the PowerBIComments data source
Patch(
PowerBIComments,
Defaults(PowerBIComments), // Use Defaults to create a new record
{
ClinicId: submittedData.ClinicId,
ClinicName: submittedData.ClinicName,
Comments: submittedData.Comments,
CreatedOn: submittedData.CreatedOn
}
);