It's a SQL table. I'm using tables from this same Azure DB and everything is fine. Somehow, trying to create a new patch isn't working at all. Tried everything. I can read the data in a Gallery, the Identity Specification is set to auto-generate and all the other values are set to allow nulls... What am i doing wrong?
The button code:
Patch('[dbo].[Discussion_Exchanges]',Defaults('[dbo].[Discussion_Exchanges]'),{Type:0,data:TextInput1.Text}); Refresh('[dbo].[Discussion_Exchanges]')
Solved! Go to Solution.
Hi @WPB,
This error message occurs when the data source is registered as a read-only data source. It's an outdated error message, and we'll be updating it soon. Could you verify that the data source is writable, and has a primary key? If it is, feel free to email me at REMOVED, and we can work through this issue together.
McCall
The first argument of Patch must be a collection. A common reason for this error is because the back-end data source is a table but there is no primary key or is read-only.
How to fix:
Let us know if this helps.
Thanks for the help!
I tried :
DataSourceInfo('[dbo].[Discussion_Exchanges]',DataSourceInfo.CreatePermission)
DataSourceInfo('[dbo].[Discussion_Exchanges]',DataSourceInfo.EditPermission)
DataSourceInfo('[dbo].[Discussion_Exchanges]',DataSourceInfo.ReadPermission)
All true.
The image is from SSMS. It shows the values in the table. I can access them using:
First('[dbo].[Discussion_Exchanges]').Data -> "Salut!"
LookUp('[dbo].[Discussion_Exchanges]',ID=1).Data -> "Salut!"
First(Filter('[dbo].[Discussion_Exchanges]',ID=1)).Data -> "Salut!"
This proves that the data is a collection.
At this point:
Appid : 7c104dad-6476-45f8-b7cf-feaa78725aab
Once again, your time is really appreciated!
I really need help with that. I've been working a lot with PowerApps but this is impossible to work around...
Is there a way I could get live support? (No idea if it's included in the Office 365 subscription or not, but I'm willing to pay)
Hi @WPB,
This error message occurs when the data source is registered as a read-only data source. It's an outdated error message, and we'll be updating it soon. Could you verify that the data source is writable, and has a primary key? If it is, feel free to email me at REMOVED, and we can work through this issue together.
McCall
I feel really bad about myself right now... two days of looking around for something so basic...
The error was that I had an auto-incrementing column in my SQL DB that i didn't declare to be primary...
Thanks a lot for the help and sorry for the troubles.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
203 | |
45 | |
45 | |
45 | |
39 |
User | Count |
---|---|
279 | |
81 | |
79 | |
79 | |
69 |