error message: "Unable to add row to table → Invalid request provided to Appsheet database

Hello!

I've created an app, using many tables created in Appsheet Database,  some tables linked to others table in the same db.

I've made a view, but when I try to save a record in the table where I add data from the other tables, I received an error message: "Unable to add row to table 'here is the name of my table'. → Invalid request provided to AppSheet database ".

The other tables used to get some data are ok, I am able to write; I don't understand what I should check, I don't understand what is wrong in my table or my connections or my data.

Could anyone help me?

Thank you very much!

Regards!

Ruxandra

 

1 17 3,842
17 REPLIES 17

Me too. Nasty one!  A single (very simple) database table (not sheet). The desktop version works fine, my phone can't add records. 

Killing the app and restarting didn't clear 2 rows of data I had added either!  Only an option to Cancel would bring up the app.  I had to clear AppSheet data (cache alone didn't work) on my phone for AppSheet - and of course lost the two updates I was trying to make.  Viewing audit logs (very hard to read the last few long-strung together lines) didn't tell me anything either, only that there were error from my phone app and not the desktop (added and deleted records fine there). 

I've seen other responses about AppSheet Databases being in beta, beware!  

I can reproduce this! At least in my case...

So I have a dropdown (ENUM) field and I've checked "Allow other values" in the view and entry settings...
Screenshot 2024-04-05 11.53.55 PM.png

 When I put in a new value and save the record, BAM!  I get the error.  I'll try adding the value via database edit, but it appears there is a bug with this option!

Also discovered a "Reset Changes" in the app menu, the only way to clear the issue on my phone - other than clearing all data for AppSheet.

Hello!

I opened a few weeks ago a ticket to appsheet support; they have investigated the issue using a test app created by me in order to be able to reproduce the problem and they have found out something wrong.

  I understand they work in order to solve this problem; I tested again when they said, there was no more problems, but I also told them that the problem appears when I made changes in the db, exactly as you.

I suggest you to open a ticket to appsheet support too and tell them you have the same issue.

I quitted the idea to use appsheet db, because anyway, it is limited at 100 columns, I'm using now a Postgresql db in cloud.  

Regards!

Ruxandra

 

 

Hello!

I told about your issue to the appsheet support team and they kindly asked you to raise a case with them in order to investigate further.

Please, find a part of the answer I received from appsheet support team where they asked for your cooperation in this subject:

"Our dedicated team has thoroughly reviewed your conversation on https://www.googlecloudcommunity.com/gc/AppSheet-Q-A/error-message-quot-Unable-to-add-row-to-table-....

Their analysis indicates that it would be beneficial if you could kindly request another user to raise a case with us. This will enable us to conduct a more comprehensive investigation and provide you with the necessary assistance."

Thank you!

Regards!

Ruxandra

 

 

Thanks.  I filed a bug report with the AppSheet team.

Super! 

Thank you!

" Invalid request provided to AppSheet database" This happend to me because I change from a Ref. type of data wich belongs to a Branch table to a Text data type. Since my app has only 3 branches there was no point to have a table for branches. So I delete the table branch and the data type in "view data source" did not change automatically to text. I remains as a Ref. type of data. Wich doesnt allow any update from plain text. That is why I got the error after delete branch table in the database. 

2 BUGS!

  1. If I regenerate the table schema, I lose all "Allow other values" settings for all drop-downs (I have 3) - and without warning.  That's nasty!  I know it's not part of the schema, but shouldn't it be!

  2. I knew this was working before, so here's what's happening...
    I have 3 ENUM fields that are all drop-downs in schema and also the flags for "Allow other" checked.
    The first entry (top most, schema order doesn't matter) that is a drop down, works just fine and will allow me to save the record if another value is entered.  However, any further drop-downs cause this error!!

  3. I can edit the database directly (not via the app) and add other items, but this kinda defeats the purpose of this setting!

@AleksiAlkio can you verify this?

So I've checked this again and it doesn't seem to be a problem anymore.  No changes to the app.

I had this error message because of ENUM columns. In the Database they were set to 
Type: Enum
Item type: Dropdown

I changed the Item type to "Text" and enabled "Allow other values".

Fabian_Weller_0-1731592234586.png

This is how I set it up in the App:

Fabian_Weller_1-1731592345334.png

 

 

Hi... just wanted to add my solution to this issue.

After 5 hours of head scratching I realized that the error I had was that Appsheet added a line return at the end of each of the over 1000 ids that I copied over from a Gsheet.

The form where I was selecting a product was causing this error when it tried to write the product id with the line return to the table. As soon as I removed the line return from the cell in the data source page, on the next sync the error cleared itself.

I've tried various ways of copying the list of ids from Gsheets, notepad and other options and I can't get Appsheet to not put the line return at the end of the id. I guess it'll be a long night of double clicking on each cell and deleting it manually. 😭

Since I'm still learning this stuff I couldn't get the import csv action to work, maybe that would be the best way, but at the moment since I found the error I'll grind a bit and fix it manually.

Hope this helps someone.

 

Hi again... 

After another 5 hours of trying to get the import csv action to work, creating a new table from Google sheets, creating another database and other convoluted attempts and in the end failing miserably, I can report that I found a way to paste the rows directly from Excel (499 at a time) without it including the line break at the end of the id field.

Though frustratring, the only thing I had to do was add another dummy empty column right after the id column and when copying from excel I had to make sure that the copy selection ended on the dummy column and not on the Id. That way, when I pasted the column in Appsheet, the line break happened in the empty dummy column leaving the id clean of extra characters and I deleted the dummy column afterward.

With this workaround my app finally could recognize the client ids without a problem.

Hope this helps and if someone from support sees this I'd be happy to elaborate if needed.

Saludos desde Mexico! 👋😎

I think the solution is to not use the system generated "Row ID" as the "Key".

1. I changed the "Row ID" to "show"

2. I created a "virtual column" and used the formula "CONCATENATE([Row ID],": ",[ID])" to generate an ID.  I used this column as the "key", and made it required.

Now Row ID is no longer the key and is no longer the key.

I had the same problem, it seemed to be caused by the column type in the database. I changed the column type from "ref" to "text" and used the "text" field to put the key of the other table, then manually override the type of the column from "text" to "ref" in the Data UI, and it fixed the problem for me. Still don't understand why that happens. IMO my solution is similar to @Knightsbridge's solution but a bit faster and simpler.

I have the same problem but connected to a supabase postgres database, it constantly disconnects indicating that it cannot access X table, and this error that we have in common is also generated, I have to reset all the records so that it is reset again.

Hello! 

I use bigquery tables, it seems to be ok till now, the connection is stable.

Ruxandra

Well, I decided to change the database engine, I am using Google's SQL
cloud and the problem was solved, in fact supabase was the one that was
generating a conflict for me.