Hello,
I am trying to edit values in my sql table from a server by pushing a button.
I get this weird error message every time I try to use my data source in the patch function.
I want to update the Value of "Zustand" in the row with the ID of my variable IDD.
Patch( '[dbo].[Leuchte]', First( Filter( '[dbo].[Leuchte]', ID = IDD)), {Zustand: "Unsicher"})
Thanks for the help
Solved! Go to Solution.
I changed the code to:
Patch( '[dbo].[Leuchte]';
First( Filter( '[dbo].[Leuchte]'; ID = IDD)); {Zustand:"Test"}
)
and now I am getting "only" the error badGateway. Could be possible I don't have the rights to change values of the table... Again thanks for the help,
@10101 ,
Try to manually update a record from within SSMS. If it works there, you have to be able to do it from Power Apps as well.
Seems like I have the right to change things in the database... so it must be something else. Thank you for the hint!
Hi @10101
In this scenario, I'd call LookUp rather than First/Filter. I'd also close and reopen your app, as sometimes that can clear "bad gateway" errors.
Patch('[dbo].[Leuchte]';
LookUp('[dbo].[Leuchte]'; ID = IDD);
{Zustand:"Test"}
)
@10101 ,
Where are you taking the 'IDD' from?
if it is a text, you have to use
LookUp('[dbo].[Leuchte]'; ID = Value(IDD))
to make it work.
Thanks I changed it to Patch( '[dbo].[Leuchte]'; LookUp( '[dbo].[Leuchte]'; ID = IDD); {Zustand: "Test"}) and I think it is right. But it still doesent work because of the BadGateway...
I tried my sql table in other app templates and tried to edit it. Everytime I try to edit the table I get the same error - BadGateway - I think it must be something about the sql server. Again Thank you!
I just got it working.
Powerapps can't handle the datatypes "geometry" and or "vabinary".
Deleted both columns and it works well. ^^
User | Count |
---|---|
261 | |
130 | |
99 | |
48 | |
47 |