Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Patch Function Not Working For All Users

(0) ShareShare
ReportReport
Posted on by 18

I've created an expenses app connected to an Azure SQL database which works well except for if users want to update a previously created item.

 

For some reason if I amend one of my own expenses, the item patches successfully but if anybody else updates their own, the patch does not apply to that entry in SQL.

 

Is this a known issue and if so, is there a workaround?

 

Thanks

 

Rob

  • JK101 Profile Picture
    JK101 16 on at
    Re: Patch Function Not Working For All Users

    I am geting the same error, Application is working fine with me. But when others try to use it they are getting error in Patch function. Could you plz elaborate the steps to check or give SQL database permission.

     

  • mdevaney Profile Picture
    mdevaney 29,987 on at
    Re: Patch Function Not Working For All Users
    @robwhite
    No worries.

    My advice is to accept your own response as a the solution and give kudos to anyone you want to thank for helping.
  • Verified answer
    robwhite Profile Picture
    robwhite 18 on at
    Re: Patch Function Not Working For All Users

    Thanks everybody for the responses and apologies for the late response. Unfortunately it appears I've wasted your time as the connection wasn't the issue at all.

     

    Further testing found the problem only occured with certain types of update and investigation found this was due to the logic being applied (nested IF statements not working correctly). This is now fixed and everyone can update exactly what they should be able to.

     

    Sorry for not checking in more depth before asking the question - not quite sure how to mark this closed now or who's answer to accept. Any hints?

  • v-xida-msft Profile Picture
    v-xida-msft on at
    Re: Patch Function Not Working For All Users

    Hi @robwhite ,

    Based on the issue that you mentioned, I think this issue is related to SQL Table Access Permission rather than Patch function itself.

     

    Please make sure these end users have proper Edit permission to your Azure SQL Table. Also please make sure you have shared the SQL Table connection to your end users.

     

    If the issue still exists, please consider re-create a new connection to your Azure SQL Table from your app, then re-share your app to your end users, then check if the issue is fixed.

     

    Best regards,

  • SeanHenderson Profile Picture
    SeanHenderson 1,104 on at
    Re: Patch Function Not Working For All Users

    Go to make.powerapps.com and select the environment the app is located in. On the left navigation expand data and click on Permissions. Find your SQL database, click the ellipsis and select Share. Make sure your SQL database is shared with all the end users and that they all have "Can Edit" permission.

     

    ---
    Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

     

  • mdevaney Profile Picture
    mdevaney 29,987 on at
    Re: Patch Function Not Working For All Users

    @robwhite 

    Have you rechecked all of the permissions settings?  Its still the most likely cause of the issue.

  • robwhite Profile Picture
    robwhite 18 on at
    Re: Patch Function Not Working For All Users

    Thanks for the replies but I don't think that can be the issue as everybody can write to the database when creating the record initially. Additionally, the database connection is using a SQL authentication login not tied to my Office 365 user account either.

     

    It is really baffling! 

  • mdevaney Profile Picture
    mdevaney 29,987 on at
    Re: Patch Function Not Working For All Users

    @SeanHenderson 

    It appears as if we posted at the same time.  Since we both came to the same conclusion its likely to be the solution.  Great minds think alike!

  • mdevaney Profile Picture
    mdevaney 29,987 on at
    Re: Patch Function Not Working For All Users

    @robwhite 

    If it works for you but not others this is likely a permissions issue.  Be sure to check that users have the access to read/write in the tables for the app.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • SeanHenderson Profile Picture
    SeanHenderson 1,104 on at
    Re: Patch Function Not Working For All Users

    Hi @robwhite 

     

    It sounds like your users don't have write access to the Azure SQL database. Either add the permissions to the users in SSMS or in the Azure portal.

     

    ---
    Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,580

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,909

Leaderboard