Skip to main content

Notifications

Community site session details

Community site session details

Session Id : e4jly3IQYgvCqFb+TQlfY2
Power Apps - Building Power Apps
Answered

Excel table update with patch function

Like (0) ShareShare
ReportReport
Posted on 18 Jun 2020 12:52:15 by 264
 

Hi,
I would like to update my table by Patch function, so if someone clicks on the item, it should be an update with a click date transferred to Excel.

I have the following issue (you can see it on a screen). It is written: The data source is either Read-Only or has no primary key.

Any ideas on how to solve it? Thank you for your time!

Categories:
  • ndujilo Profile Picture
    2 on 24 Jan 2023 at 07:38:57
    Re: Excel table update with patch function

    hello, can you please explain? 

    i am actually stuck with this

  • v-bofeng-msft Profile Picture
    on 22 Jun 2020 at 01:40:18
    Re: Excel table update with patch function

    Hi @pal95 :

    Has your problem been solved?Do you still have any questions?

    If the problem has been solved, I suggest you mark your solution as a solution, so that more people can see it.

    Best Regards,

    Bof

  • pal95 Profile Picture
    264 on 19 Jun 2020 at 12:27:09
    Re: Excel table update with patch function

    Thank you, The solution was just to use OneDrive instead of Excel

  • Verified answer
    v-bofeng-msft Profile Picture
    on 19 Jun 2020 at 08:18:41
    Re: Excel table update with patch function

    Hi @pal95 :

    Could you tell me:

    Using excel as a data source has the following restrictions:

    1\An Excel file may be locked in OneDrive for an update or delete up to 12 minutes(OneDrive) since the last use of the connector.

    2\You should not have the Excel workbook open in OneDrive when you are trying to update it, or you will receive the error “The requested resource is locked.

    3\You can only edit the formatted table that in the Excel file. Format the Excel data as a table

    4\If your Excel data includes a calculated column, you can't use it to build an app, and you cant add that data to an existing app.

    5\The maximum size of an Excel file that is supported by the Excel Online (OneDrive) connector is 5 MB.

    Best Regards,

    Bof

     

  • pal95 Profile Picture
    264 on 18 Jun 2020 at 13:45:52
    Re: Excel table update with patch function

    No one of them helps. I literally copied an example from https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-patch#examples now and it still shows me the same primary key or read-only error on an IceCream table.

  • eka24 Profile Picture
    20,921 on 18 Jun 2020 at 13:34:01
    Re: Excel table update with patch function

    If you have calculated Columns or the SubTotal as you have shown in your table, remove them.

    Also does your excel table have a PowerApps_id column?

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • pal95 Profile Picture
    264 on 18 Jun 2020 at 13:17:34
    Re: Excel table update with patch function

    It does not make any change, still the same error appears

  • eka24 Profile Picture
    20,921 on 18 Jun 2020 at 13:06:16
    Re: Excel table update with patch function

    Your criteria at "Bridlington" is a Column Name not a Text inside the column. So use:

    Patch( Table1, First( Filter(Table1, Bridlington = "Clean Low Level Probe" ) ), { ‘Last Check’: Now() } )

     

    Or
    Patch( Table1, First( Filter(Table1, ID = 1 ) ), { 'Last Check': Now() } )

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,743 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,089 Most Valuable Professional

Leaderboard