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 / Edit form submit not w...
Power Apps
Answered

Edit form submit not working with AddColumn data source

(0) ShareShare
ReportReport
Posted on by 43

Hi - if anyone can help me solve this I will be eternally in their debt...

 

I'm trying to create a library subscriptions app. I was struggling with getting the correct names for my Subscriptions gallery fields, which someone was kind enough to help me with here.

 

Now that I'm working with a gallery featuring additional columns, though, the detail and edit forms associated with these gallery items are proving problematic.

 

They both display the "Connect to Data" message, although my data is still showing over the top of them. Going by the solution to this post I have made sure to change the DataSource from my Browse Gallery name to the actual formula for my custom data source with added columns; but the "Connect to Data" message still shows.

 

This isn't the end of the world, as it's not visible in play mode and the data displays fine. Everything seems to be working, EXCEPT my submit form button. If I click it when creating a new record, nothing happens. If I click it when trying to edit an existing record, I get the "There was a problem saving your changes. The data source may be invalid" error message, as queried here.

 

I have tried everything I can think of; I've gone through every line of code I've written, I've remade the forms from scratch, I've saved, published, exited, re-entered, you name it. Nothing seems to work.

 

What's super frustrating is that these forms were working and submitting fine a week ago, so I don't know what's gone wrong. I previously had the idea of linking multiple galleries to the same edit form, and was playing around with that as an option, but soon realised it wasn't necessary for the app and so removed all the extraneous code. That's when it seemed to completely break.

 

This is the final thing I really need to fix before I demo this thing. Praying someone out there has an answer...

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

    @JTA88 

    You have to maintain consistency between the datasource in the form and the datasource and item property of the forms. In the example on the right, the datasource of the gallery is 

     

    With(
     {
     wcontacts: AddColumns(
     FakeNames,
     "citystate",
     city & ", " & state
     )
     },
     SortByColumns(
     Search(
     wcontacts,
     TextSearchBox2.Text,
     "company_name"
     ),
     "company_name",
     If(
     SortDescending1,
     SortOrder.Descending,
     SortOrder.Ascending
     )
     )
    )

     

    The Item property is Lookup(FakeNames, ID=Gallery1.Selected.ID) and the datasource of the form is FakeNames.  It functions perfectly. 

    _1.png

  • JTA88 Profile Picture
    43 on at

    THANK YOU!!! I owe you a beer 👍

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard