Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

There was a problem saving your changes. The data source may be invalid.

I have been trying to resolve this issue for days now and still no luck.


I am trying to update a contact item in the contact entity within CRM.

The user selects the contact from a Display Gallery which i then use Gallery1.Selected as the Item in the Edit Form.


The user can then modify the email address of the contact and when pressing next, this should go off and update the record with the new email.


Issue is, when i click the next button, it comes up with the error shown in the subject ^. I have tried recreating the Contact Data connection in PowerApps.


I have run out of other ideas to try and any help would be great.


Thanks in advance


Accepted Solutions

OK, if the problem then might be with the forms then you might try to create your own.

Here is a basic post I wrote that may give you some ideas:

View solution in original post

Community Champion
Community Champion

I would try to patch a change to a record to distinguish from issues from data issues.


You can create a button with OnSelect:

Patch(YourTable, Gallery1.Selected, {EmailField: ""})

Also, I would check the data type of the email field and whether there are any constraints.  Ideally it would be a text (i.e. nvarchar()) type with no constraints.


PS I always abandon PowerApps forms and prefer to roll my own

Thanks for your help.


However the Patch doesn't seem to be working either. The emailaddress1 field is a single line of text within CRM (which PowerApps recognises)


The Patch i used is as follows:

Patch(Contacts, DG_StuList.Selected, {emailaddress1: TB_StuEmailAddress_1})

Does the Errors() function give you any insight?

How would i use the Error() function in my scenario? I have had a look and can't seem to get it working.

It is not Error() but Errors():


Create a gallery and set Errors(Contacts) as the Items property.

Then add labels to the gallery template to show you what information is there.

Alternatively do this:

Patch(Contacts, DG_StuList.Selected, {emailaddress1: TB_StuEmailAddress_1}); ClearCollect(MyErrors, Errors(Contacts))

And then look into the collection in PowerApps Studio


I tried the ClearCollect method and it didn't yield anything.


I even tried on the other connections i have in my app but still nothing.


Strange enough, when i disable all other submissions other than the Patch(). It works fine (sort of)

OK, if the problem then might be with the forms then you might try to create your own.

Here is a basic post I wrote that may give you some ideas:

Thanks, Patch worked in the end! I will start going through modifying my implementations with this function cause it performs a lot better.

Advocate V
Advocate V

Could be caused by a trigger on the table for the update. Those are not allowed by the way the SQL-connector done, apparently.


Helpful resources

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Users online (1,818)