Iām trying to use a Power Apps button to write back into a Databricks table using Patch().
The Databricks table is:
pilot_tpmeast.powergen_station_details
In Power Apps, I can read from the table successfully. For example, this works:
First('pilot_tpmeast.powergen_station_details').CommentID
and this also returned true:
DataSourceInfo(
'pilot_tpmeast.powergen_station_details',
DataSourceInfo.EditPermission
)
However, when I try to use the table in a Patch() function on a buttonās OnSelect, the data source name gets a red squiggly line and the formula does not work.
This is the formula Iām trying to use:
Patch(
'pilot_tpmeast.powergen_station_details',
Defaults('pilot_tpmeast.powergen_station_details'),
{
Station: modernDropdown2.Selected.Value,
WeeklyMonthly: modernDropdown1.Selected.Value,
Period: DatePicker1.SelectedDate,
Comment: DataCardValue4.Text,
CommentBy: User().Email,
CommentTime: Now()
}
)
Any guidance would be appreciated.
Thanks!