web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Apps Patch to Da...
Power Apps
Suggested Answer

Power Apps Patch to Databricks table showing red squiggly under data source

(1) ShareShare
ReportReport
Posted on by 2

Hi everyone,

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!

Screenshot 2026-0...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    3,206 on at
    The red squiggly line on the datasource inside Patch() strongly suggests that the Databricks connector you're using supports reading but does not expose full
     
    CRUD operations to Power Apps. This is a common limitation with analytics-oriented connectors.
     
     
    The most reliable solution is to:
    • Keep Databricks as the data source.
    • Create a Power Automate flow that performs the INSERT/UPDATE.
    • Call the flow from Power Apps instead of using Patch().
    This pattern is widely used for Databricks, Snowflake, Fabric Warehouse, and other analytical data platforms where direct Power Apps writeback is limited or unsupported.
  • Suggested answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 1 on at
    Hi @TS-03060120-0,

    Try this:
     
    IfError(
        Patch(
            'pilot_tpmeast.powergen_station_details',
            Defaults('pilot_tpmeast.powergen_station_details'),
            {
                CommentID: GUID(),
                Station: modernDropdown2.Selected.Value,
                WeeklyMonthly: modernDropdown1.Selected.Value,
                Period: DatePicker1.SelectedDate,
                Comment: DataCardValue4.Text,
                CommentBy: User().Email,
                CommentTime: Now()
            }
        ),
        Notify(
            First(Errors('pilot_tpmeast.powergen_station_details')).Message,
            NotificationType.Error
        ),
        Notify(
            "Saved successfully",
            NotificationType.Success
        )
    )
     
    Only use GUID() if CommentID is a string/GUID-compatible column. If it is an integer key, generate the key in Databricks or use an identity column.
    If CommentID is an identity/generated column, make sure the Databricks table is defined with a proper primary key and generated identity column. In that case, do not manually pass CommentID. Also check that the table has an actual Databricks primary key constraint, not just a column named CommentID. Reading from the table can work without a primary key, but Patch() write-back is stricter.
     
    One more thing to verify: column data types. DatePicker1.SelectedDate is a date value, while Now() is a datetime value. If the Databricks columns are DATE, TIMESTAMP, or strings, make sure the Power Apps values match what the connector expects.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    SpongYe Power Platform Enthusiast [LinkedIn] | [Youtube| [My blog]

     

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution āœ”ļø. You can also check out my blog [@SpongYe] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard