Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

How to prevent navigation to next screen until patch successfully creates record in SQL table?

(1) ShareShare
ReportReport
Posted on by 22
Hi all,

Running into an issue where a patch function intermittently does not go through and does not display an error message. The patch initiates to the SQL table when selecting a button and then navigates to a "end" screen. My theory is that the patch is not completing before the the users reach the end screen and then they exit the app. How can I validate that the record is created in the SQL table prior to the app navigating to the end screen?
 
 
  • Suggested answer
    nvrhughes Profile Picture
    nvrhughes 85 on at
    How to prevent navigation to next screen until patch successfully creates record in SQL table?
    You could always use Power Automate to update the SQL table. Once the SQL step is complete you can add a Respond to Power Apps step in the flow. You can send back any data from the table you want and any steps you have after calling the flow from the canvas app wont run until the flow responds. There is a 120 second timeout between Power Automate and Canvas apps FYI. 



  • NMatGWM2 Profile Picture
    NMatGWM2 22 on at
    How to prevent navigation to next screen until patch successfully creates record in SQL table?
    Users are not receiving an error when this occurs, though. They reach the "end" screen without an error, yet the data was not patched.
  • Suggested answer
    mmbr1606 Profile Picture
    mmbr1606 10,450 on at
    How to prevent navigation to next screen until patch successfully creates record in SQL table?
    hey
     
     
    did u already try something like this:
    IfError(
        Patch(SQLTable, Defaults(SQLTable), {Column1: Value1, Column2: Value2}),
        Notify("Error saving record. Please try again.", NotificationType.Error),
        Navigate(EndScreen)
    )
    
    you would need to modify the patch to your needs.
     
    if it helps please mark as verified answer
     
     
    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

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,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard