cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Can't edit my powerapp that connects to a postgres database

I have an app with a Postgres database as a data source. I created that app using "Start from data" template which automatically creates a three screen (Browse, Detail, Edit) mobile app from the data. 

 

The App is successfully created and the three screens were generated. When I navigate to the editform and try to edit any value I get the below error: 

 

The requested operation is invalid. Server Response: We can't update the value. The operation or its argument aren't supported by the value. inner exception: We can't update the value. The operation or its arguments aren't supported by the value. clientRequestId:d9b1577e-6bb0-4b43-9e7c-420207915f7b

 

Does anyone know why that error occurs?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

I figured out the issue. If the data type of the primary key column is not integer the update operation fails. Things started working fine after changing the data type from "text" to "int". Luckily, I am flexible to change the data type but it might not be the case for everyone.

 

Should this be reported as a bug?

 

 

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Just some more information, the user role used to connect to the postgres database has permission to UPDATE, DELETE, INSERT data into the table.  I am using https://docs.microsoft.com/en-us/connectors/postgresql/ postgresql connector in this App. Please let me know if you need more information to troubleshoot this issue.

Hi @Anonymous

 

What are the data types of the fields in your table? Do you have any non numeric, or non text fields in your table? If so, perhaps there's a bug in the way that the Postgresql connector handles the more unusual data types.

Anonymous
Not applicable

Hey, thanks for chipping in.

 

I only have few integer data type fields and text data type fields in my table. Should I try converting the text datatype fields into varchar ?

No problem. Unfortunately, I'm not too familiar with Postgresql but I hope that someone with more experience can better answer your question. In the absence of any other reply, I would try to convert the text data type fields to varchar to see if that makes a difference.

On the basis that the template created all 3 screens, I assume your table has a primary key. But if not, I would make sure to define a primary key on your table.

Also, do you receive the error when you attempt to add a new record, or do you only receive it when you edit an existing record?

Anonymous
Not applicable

I figured out the issue. If the data type of the primary key column is not integer the update operation fails. Things started working fine after changing the data type from "text" to "int". Luckily, I am flexible to change the data type but it might not be the case for everyone.

 

Should this be reported as a bug?

 

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,332)