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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (37,474)