Airtable UpdateRow and UpdateRowNum - "Trouble Updating Row"

I’m having some trouble using UpdateRow and/or UpdateNumRow with airtable and I’d be grateful if someone can let me know what I’m doing wrong.

First I create the row in screen A (indirectly, by creating a row in another spreadsheet with a lookup to my main spreadsheet):

This creates the following in my AirTable:

(Extra rows cropped for simplicity)

Then navigate to screen B and update the row:

This prompts the following error:

Using UpdateRowNum creates the same error message, but giving a different field name (which is also valid)

If I use CreateRow here then the row is created successfully, so it’s not an issue with the data or with the AirTable setup, but it means I wind up with two rows where I need one.

I think I may be able to get around this by creating the record at a different stage in the process, but it’ll make the code a lot messier, so I’d be grateful if someone can spot my error.

ETA: It appears the issue is that the block is trying to update the wrong _id - I’m passing it the correct _id (see label above the error message below) but then the error message gives me a different one which doesn’t appear to correspond to any records in my airtable. Is this an artefact of the update process?

Updated images above to show this more clearly.

1 Like

Hey @ekc :wave:

Thanks for the detailed question!

Take a look at this tutorial to learn more about updating Airtable:

1 Like

I would like to view the same as i am having a similar issue but link is not available could someone help me with a work around updating a Airtable row in another screen.

Thanks in advance

Hi @ekc and @domhnallohanlon,

I get the same error “Trouble updating row …” in combination with airtable. I tried to narrow this error down, I hope this helps to find a clue. The error happens when simply speaking getting one row and writing it back (without chaning anything) with the block “updateRow”:

I reduced my app to the neccessary parts to show the error:

  • get one row
    – don’t change anything in that row!
  • write back that row

and this simple setup leads to an error “Trouble updating row recQVetcetcetc. Invalid attachment object for field Photos: [object Object]”. Just to show, that the field “Photos” is valid I take an attachment and display it on my sample app.

Just in case:

  • the API key is valid
  • I am able to update single cells in that row. But it is a bit awkward and boring to write many cells instead of using one single block “updateRow”

Here are the blocks:

I’m having the exact same problem! Did you ever find a solution?

If you have the same problem, it’s still important to share a screenshot of your blocks and/or a link to your project. It’s really unlikely that you have the exact same blocks as the other people above.

So it may be something small and correctable but we’ll never know if you don’t explain what you’ve tried, what happens when you preview/test your project, and what you’re expecting to happen.

1 Like

Hi to @leeristhkfpe4 and @tatiang , I found out the problem arises when we have a fieldtype “attachment” in airtable. In Airtable you can define different kinds of data types like numbers, strings etc. I have tested successfully to read this simple data from airtable and also write it back.

Problem arises when there are more complex structures like attachments in Airtable. You can test it by yourself: define a database in airtable with 3 fields, lets say a number, a name and an attachment. In Thunkable get one row with the block getRow and analyze the result: the number and the name are just plain data but the attachement is “[object Object]” which means: an array of objects. The array counts from 0 to n objects, and each object contains fields like “url”, “file” etc.

If you try to write this structure back, then thunkable throws an error. I don’t know if this is a bug in thunkable or a bug on airtables side. This should be examined by a thunkable engineer.

1 Like

Thank you for your clarification. It is unfortunate that Airtable does not allow the upload of files programmatically in the attachment field (see this post and @tatiang comments).

Having said that, you can still use the UpdateRowNum to update the other fields (columns) in the row such as this


For the following table

It will not work for the block UpdateRow.

Thanks @Michael_Rogulla. I also realized the Airtable row I was updating has a field that is populated via a formula. So even though I’m not changing the data in that field, thunkable must be trying to replace that entry with itself, and is meeting with an error since you can’t freely type/paste into that kind of field. I ended up having to write a function that goes through the fields of each row individually and only updates those that have changed.