cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Regular Visitor

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

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
Highlighted
Regular Visitor

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

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.

Highlighted
Super User III
Super User III

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

Hi @narain337

 

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.

Highlighted
Regular Visitor

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

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 ?

Highlighted
Super User III
Super User III

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

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?

Highlighted
Regular Visitor

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

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,877)