# Airtable UpdateRow and UpdateRowNum - "Trouble Updating Row"

**URL:** https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290
**Category:** Questions about Thunkable X
**Tags:** airtable
**Created:** [February 27, 2020, 9:26pm UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290 "2020-02-27T21:26:03Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ekc](https://avatars.discourse-cdn.com/v4/letter/e/c67d28/32.png) [@ekc](https://community.thunkable.com/u/ekc)
#### Post date: [February 27, 2020, 9:26pm UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/1 "2020-02-27T21:26:03Z")

</div>

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):

 ![Capture2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/1/314fc3986050c7e58d0264aaeaee66f707f1829d.jpeg)

This creates the following in my AirTable:

 ![Untitled-3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/e/5ed368dff32f12c12aa7288d184806010291f86b.jpeg)  
(Extra rows cropped for simplicity)

Then navigate to screen B and update the row:

 ![Capture5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/1/31760321ec96cd03c716c911c8457f8b8da239ee.jpeg)  
This prompts the following error:  
 ![Screenshot_2020-02-27-20-59-41](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/2/f22a1fee7ea787a8649092a6f332d817f681c324.png)

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?

 ![Untitled-4](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/9/89fb8a2bbd0e6f3e08d99941ae4d76f9c6d21847.jpeg)

Updated images above to show this more clearly.

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [March 30, 2020, 3:40pm UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/2 "2020-03-30T15:40:56Z")

</div>

Hey @ekc 👋

Thanks for the detailed question!

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

> [@Airtable tutorial](http://community.thunkable.com/t/airtable-tutorial/531535):
>
> Working with airtable can be confusing. This sample app features: Filtering and viewing data Dynamically changing the filter Find a row number Pull specific info from a cell in a row Updating 1 cell inside a particular row Adding Rows Deleting Rows Remix Link: [https://x.thunkable.com/copy/15949b2e4aec44fe2eb7fd1a72c47414](https://x.thunkable.com/copy/15949b2e4aec44fe2eb7fd1a72c47414) [UPDATED LINK] Live Web App: [https://thunk.app/w/bbHuW-EAv](https://thunk.app/w/bbHuW-EAv) An explanation of how to build this app will be posted on my website sometime this week along with the w…

---

<div class="post-metadata">

### Author: ![thanos-x](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/thanos-x/32/91404_2.png) [@thanos-x](https://community.thunkable.com/u/thanos-x)
#### Post date: [August 1, 2020, 11:53pm UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/3 "2020-08-01T23:53:12Z")

</div>

> [@Airtable tutorial](https://community.thunkable.com/t/airtable-tutorial/531535/1):
>
> [Thunkable](https://x.thunkable.com/copy/dce07df0bd0ed834cb1fde0f9f4f0987)

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

---

<div class="post-metadata">

### Author: ![Michael\_Rogulla](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Michael\_Rogulla](https://community.thunkable.com/u/Michael_Rogulla)
#### Post date: [August 19, 2020, 8:30am UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/4 "2020-08-19T08:30:03Z")

</div>

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 use a simple airtable database, which can be found in the samples section from airtable ([Getting started: making new tables and linking records – Airtable Support](https://support.airtable.com/hc/en-us/articles/360021502354)). This database consists of:  
– columns with text like “Name”, “Bio”, “Genres”  
– a column with a link to another table  
– a column with attachments (Photos)

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:

 ![grafik](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/8/58c707706129940daab2e118bd95a22d26073c93.png)

---

<div class="post-metadata">

### Author: ![leeristhkfpe4](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@leeristhkfpe4](https://community.thunkable.com/u/leeristhkfpe4)
#### Post date: [October 29, 2021, 2:56am UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/5 "2021-10-29T02:56:09Z")

</div>

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

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [October 29, 2021, 3:04am UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/6 "2021-10-29T03:04:58Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Michael\_Rogulla](https://avatars.discourse-cdn.com/v4/letter/m/ba8739/32.png) [@Michael\_Rogulla](https://community.thunkable.com/u/Michael_Rogulla)
#### Post date: [November 1, 2021, 12:24pm UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/7 "2021-11-01T12:24:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [November 1, 2021, 1:18pm UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/8 "2021-11-01T13:18:59Z")

</div>

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).

> [@Is it possible to use Thunkable As interface to attach any file from my IPhone into Airtable?](https://community.thunkable.com/t/is-it-possible-to-use-thunkable-as-interface-to-attach-any-file-from-my-iphone-into-airtable/1140700/3):
>
> Airtable only supports files from fully qualified URLs so you might need to try to upload your file to a temporary file server first and obtain the URL of the uploaded file then use it for Airtable. I have not tried it myself but one thing I know is Airtable will not use local file path.

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

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/7/97fb188defc8e817b0362fc965ba87011431fc51.png)

For the following table  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/3/c3e516c4694a69e572845b825087789d04ec117a.png)

It will not work for the block `UpdateRow`.

---

<div class="post-metadata">

### Author: ![leeristhkfpe4](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@leeristhkfpe4](https://community.thunkable.com/u/leeristhkfpe4)
#### Post date: [December 5, 2021, 6:22pm UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/9 "2021-12-05T18:22:09Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:39am UTC](https://community.thunkable.com/t/airtable-updaterow-and-updaterownum-trouble-updating-row/488290/10 "2024-11-08T11:39:35Z")

</div>


