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?
Solved! Go to Solution.
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?
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 @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.
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?
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?
User | Count |
---|---|
185 | |
123 | |
91 | |
47 | |
42 |
User | Count |
---|---|
271 | |
159 | |
132 | |
85 | |
78 |