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 / EditForm new values no...
Power Apps
Answered

EditForm new values not being reflected in the data source

(0) ShareShare
ReportReport
Posted on by 27

Hi all,

 

I've been working on creating a PowerApp connected through a SQL Server database. The only thing causing me grief at the moment is the Edit/Submit Form. For some reason whenever I try and update a record in the edit form, and click my button that submits the form, the new data values aren't being pushed to the datasource. The new values stay reflected on the form itself, but the datasource isn't getting the new values. I have messages checking both the OnSuccess and OnFailure actions, but the OnFailure never triggers so I can't be certain what's going wrong here.

 

Does anyone have any ideas as to what could be the problem? I've tried searching the forums and google, but couldn't come up with anything that helped me fix the issue.

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @ConRobMcC 

    This may be an obvious question but what is the OnSelect command of your Submit button and what is the Item property of your form?

  • ConRobMcC Profile Picture
    27 on at

    Hi @Drrickryp 

     

    The OnSelect is just a simple SubmitForm(formname), and the Item is the Gallery.Selected from the previous screen.

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @ConRobMcC 

    Try Lookup(YourDataSource, ID=GalleryX.Selected.ID) and make sure the datasource matches the one listed in the Data Source property of your form and the Gallery name reflects the gallery in which the item has been chosen.  If that doesn't work, I suspect that the problem is going to be with the ID field.  Try removing it and re-selecting it again from the field list. 

  • ConRobMcC Profile Picture
    27 on at

    @Drrickryp ,

     

    Sadly that didn't help save to the datasource. As an aside, is that a better way of populating the Item field in the future instead of the basic Gallery.Selected?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @ConRobMcC 

    I always use a lookup function as it will always work to identify the correct record in the original datasource.  The problem is if the datasource of the gallery is a collection or if it has been reshaped using AddColumns(), DropColumns(), RenameColumns() or ShowColumns(). ( ref. https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping ) then it is no longer the same as the datasource in the form and a simple Gallery1.Selected will not work.  Form datasources must be actual tables and not collections or shaped tables. 

    If the changes that you made to the edit form still do not work. To troubleshoot where the problem is, delete the form and try again with a new form.  Make sure that the ID field and all the other fields in the record populate when you select the record in your gallery.  Make sure that you have accounted for any field in your SQL table that is required by it. 

  • ConRobMcC Profile Picture
    27 on at

    @Drrickryp 

     

    Hmm, well I'm not sure what to say because the table I'm using is straight from our SQL Server and I haven't made any changes to the table on the PowerApps end of things. 

  • ConRobMcC Profile Picture
    27 on at

    @Drrickryp 

     

    When I try making a new edit form, all the data fields default to the view display mode (instead of edit) and each field has two text labels, rather than one label showing field name and a text input box for input. This is what happened when I first made the app and I just changed things to fit my needs, but I'm wondering if this hints at a deeper issue with the data connection itself?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @ConRobMcC 

    Make sure the form mode is set to Edit.  That there is a valid datasource and that the Items property of the form specifes the record being edited.  If all of these are done right, the form should show data in all of the fields.  

    You can let PowerApps create your gallery and forms automatically if you go to make.powerapps.com and select SQL from the start from data.  Powerapps will make the entire app from your SQL table.  You can check out the properties of all of the buttons and forms to make sure you are doing it right. 

  • ConRobMcC Profile Picture
    27 on at

    @Drrickryp 

     

    So my initial problem stemmed from the fact the database table was being seen as read only from PowerApps's end, but after fixing the primary key column that issue is no longer the case. However, the SubmitForm function is still not properly updating the selected record. I've also tried using Patch() and UpdateIf(), but both of these functions throw the same error: that the "Specified record cannot be found. Server response: resource not found." 

     

    Do you have any ideas as to what could be the issue? I've been looking at other forum posts that have a similar issue, but none of the responses have seemed to help me.

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @ConRobMcC 

    I'm not sure where you are with respect to my suggestions.  Have you tried to let PowerApps create the app for you from the make.powerapps.com page using your SQL table as the datasource? 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard