# The AirTable API (a more efficient way to integrate AirTable with Thunkable)

**URL:** <https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167>\
**Category:** Tutorials and DIY Guides\
**Tags:** community, webapi, airtable, expert, tutorial\
**Created:** [December 4, 2020, 5:16pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167 "2020-12-04T17:16:52Z")\
**Posts on this page:** 20\
**Page:** 2

<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:** [December 14, 2021, 4:09pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/21 "2021-12-14T16:09:47Z")

</div>

> [@muneer](#):
>
> This shows that the numbers are keyed in as text

Where do you see that? The `filterByFormula` block is using text strings for the query parameter but the numbers themselves are just numbers, I believe. I could be wrong!

Also, I think your formulas need double quotes (") if those are in fact strings and not numbers. It may need url encoding as well… I’m not sure.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [December 14, 2021, 5:30pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/22 "2021-12-14T17:30:51Z")

</div>

Hey Guy! Check this one out.

This works perfectly for me and returns only females over the age of 28

 ![Screen Shot 2021-12-14 at 12.28.44 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/d/ed5abc58276632b9f30ff52fedbfb6338b98f069.png)  
 ![Screen Shot 2021-12-14 at 12.29.32 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/4/14d097627df65d0f6458029a63f0de20c0d19602.png)  
 ![IMG_477784981CF9-1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/9/a997d75b4454b51a898b2cc91c3c0eeec812cb6f.jpeg)

---

<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:** [December 14, 2021, 5:51pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/23 "2021-12-14T17:51:41Z")

</div>

If you look at his code, he is using a text block for the number not a math block and he says it works.

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [December 14, 2021, 9:27pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/24 "2021-12-14T21:27:18Z")

</div>

change the test to` {Age}>"5"` and see if it still works

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 16, 2021, 7:11am UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/25 "2021-12-16T07:11:07Z")

</div>

Thanks Tatiag, the double condition on the query works perfectly now. I couldn’t find anything on Airtable.

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 16, 2021, 2:03pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/26 "2021-12-16T14:03:09Z")

</div>

The two conditions in the query work perfectly. the problem I have now is this: I want to save the data locally, on a list, but it doesn’t work. It does not return anything. Ideas?

 ![Su post BIS](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/8/386dea8ef125b0ab86275f7415535cb904a9cd99.png)

---

<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:** [December 16, 2021, 3:51pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/27 "2021-12-16T15:51:45Z")

</div>

Can you post the full JSON response as text? That way I can help you with parsing it.

I’ve always checked to see if a property is `null` rather than `empty`. I’m not sure if that might be causing a problem.

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 16, 2021, 3:57pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/28 "2021-12-16T15:57:29Z")

</div>

no. the data must be presented in a DVL, I thought I would pass them locally first. To get a faster answer. I err?  
The first time I coded it worked, now it doesn’t. I didn’t check if null instead of empty, but on label it works, on list it doesn’t.

---

<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:** [December 16, 2021, 4:12pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/29 "2021-12-16T16:12:22Z")

</div>

> [@Dario\_Cappello](#):
>
> The first time I coded it worked, now it doesn’t.

Without knowing how the JSON is structured, I can’t tell if the blocks you used are correct or not. But I looked at my own Airtable API sample JSON response and I believe that your property blocks are **correct**. Try something simpler: in the `then do` section, set the value of a label to the `get property` blocks to see if that works. Leave out the `if/do` block and `list` blocks for now.

You also should always check the value of the green error block. You can assign it to a label to make sure you’re not getting an error from the API. What is the value of that block when you test the project?

Also, is `app variable Nome_List` initialized or set to an `empty list`? It should be before you start adding items to it.

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 16, 2021, 6:31pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/30 "2021-12-16T18:31:58Z")

</div>

> [@tatiang](#):
>
> Without knowing how the JSON is structured, I can’t tell if the blocks you used are correct or not. But I looked at my own Airtable API sample JSON response and I believe that your property blocks are **correct**. Try something simpler: in the `then do` section, set the value of a label to the `get property` blocks to see if that works. Leave out the `if/do` block and `list` blocks for now.
> 
> You also should always check the value of the green error block. You can assign it to a label to make sure you’re not getting an error from the API. What is the value of that block when you test the project?
> 
> Also, is `app variable Nome_List` initialized or set to an `empty list`? It should be before you start adding items to it.

Probably the problem is on the end of the table, how do you text null in your opinion?  
I did some testing but I can’t solve.

---

<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:** [December 16, 2021, 7:12pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/31 "2021-12-16T19:12:38Z")

</div>

You need to simplify things first. Are you able to assign a label to the `get property` blocks and see a value from your Airtable database? That should be your first step.

For example, can you display this?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/6/b69d82522f5e8d6e10e16e33a45bfa90a7e716e9.png)

If so, yay! If not, please post a screenshot of how you are trying to display that value.

By the way, here’s another way to get the same value:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/7/475a5936f6dfc4bb2d49f0c17924e4d2a9772956.png)

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 16, 2021, 7:28pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/32 "2021-12-16T19:28:03Z")

</div>

> [@tatiang](#):
>
> cercando di visualizzare quel

Everything works if I don’t scroll the whole table. In fact, I value well the list variable that I created. But if I take the loop over the table data it doesn’t give me any results. So I have to be able to test the end of the table for good. But I don’t know how to do it.

---

<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:** [December 16, 2021, 7:35pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/33 "2021-12-16T19:35:24Z")

</div>

If you are using a loop, share a screenshot of that. I do see a loop in a post above but I don’t know if it’s the same set of blocks.

I also can’t see in that screenshot how you are using the loop index value (e.g. 1 to 10). So I would need to see that.

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 16, 2021, 8:16pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/34 "2021-12-16T20:16:29Z")

</div>

The table has 96 records, if I set the cycle to 100 I have no result.  
In the screenshot I set it to 50 and Label14 shows me the fields.  
Immediately after cycle to fill the DVL and nothing, the load icon spins indefinitely.  
So two problems, one I can’t understand the table end, two I can’t fill the DVL. Yet it seems such an easy thing.

 ![Su post BIS2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/2/429819e33bdc74ca435e8c204ecbf707226e12dc.png)

---

<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:** [December 16, 2021, 8:48pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/35 "2021-12-16T20:48:09Z")

</div>

This code is meant to break and not to work properly.

In the first loop of 1 - 50 you are filling the list using `in list ..... set #` this only works for a predefined list. This means if your list has 15 items it will work OK until it reaches round 16 and the code will break because you are trying to set a value outside of the size of the list.

In the second loop of 1 - 50 you are trying to change the text of the a column in a DVL by passing the numbers 1 - 50 which is not recognized by the DVL. The way the DVL is set is to only recognize the record ID not the sequential numbers.

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 16, 2021, 9:06pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/36 "2021-12-16T21:06:32Z")

</div>

what’s the 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:** [December 16, 2021, 10:36pm UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/37 "2021-12-16T22:36:43Z")

</div>

You should be inserting the list item _at the end_ of the list rather than at #\_\_\_\_\_\_\_. Use this block:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/3/f3726d4ce095beccd5343fe044c7c9bb1b287772.png)

Before starting the loop, make sure to set the list variable to the `empty list` block.

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 19, 2021, 9:30am UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/38 "2021-12-19T09:30:48Z")

</div>

I update you on what I have learned in these days. 1) How to understand how many records come out of a query.  
2) row\_ID of the DLVs is not a number but a hexadeciamle code, and using a conversion table, it is possible to modify the fields of the DVLs from the code. Unfortunately they are not stable, but some changes. What can be done? it’s a thunkable bug.

DECODING TABLE:

| Row\_ID | real row\_ID |
| --- | --- |
| 1 | b9f0468d-27e1-4b89-a0aa-9c6fc4535352 |
| 2 | 3f8abee9-dc35-4ab2-8825-3fe388a5f3a0 |
| 3 | c3469c82-b033-4776-91c4-992a22e8e3de |
| 4 | 831f3fbb-eead-475f-a4d8-2f1fe419c93d |
| 5 | 68793a23-37ec-44b9-acae-a24efde80365 |
| 6 | 311c971f-4001-4f65-8363-5473a31cb71b |
| 7 | e6ca0f0a-e920-4e6a-a169-2d5d3cce23c4 |
| 8 | a176ddee-16fc-4a3c-b30a-8306b9789880 |
| 9 | f26dd7d1-6758-41b3-bcc1-bad1d959993c |
| 10 | 8ba1646f-26e8-4b3d-9ff5-9a985bc90463 |
| 11 | 2d9339ee-a14b-4c5c-9ad6-c36272978320 |
| 12 | 601f74ce-2328-4266-b22d-0f1e643f4fcf |
| 13 | f4cc43eb-2bcf-465f-80de-8272be5465ea |
| 14 | 4d27e289-2393-40b8-8393-b4701c74daaa |
| 15 | 1981ce16-b2bf-425e-aede-626ed188d0fe |
| 16 | 82131544-7811-4d4f-a114-bb6f766b65ee |
| 17 | 910b255f-b95a-4eaa-8027-c860efad1797 |
| ![image | 429x451](upload://5HFMlVWDMW1hCAMYjgwv9oH9acK.png) |

 ![Su post BIS3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/f/4f311a24eaf02795bd3849f863cbb6503a23d103.png)

with row\_ID decoding table, I get this on mobile …

[video.zip](https://community.thunkable.com/uploads/short-url/5E7MHNmLheK5RMfblQO74T0NDk2.zip) (2.0 MB)

---

<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:** [December 19, 2021, 9:45am UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/39 "2021-12-19T09:45:10Z")

</div>

Dear @Dario_Cappello  
If you refer to my comments above you will see that the only way you refer to rows inside DVL is by using the internal RowID which is a UUID code.

Avoid trying to cross reference it with row count/sequential numbers. It just doesn’t work.

---

<div class="post-metadata">

**Author:** ![Dario\_Cappello](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@Dario\_Cappello](https://community.thunkable.com/u/Dario_Cappello)\
**Post date:** [December 19, 2021, 10:07am UTC](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167/40 "2021-12-19T10:07:12Z")

</div>

> [@muneer](#):
>
> internal RowID

Dear muneer, thanks for the reply. Where do i find internal RowID?

[Previous page](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167.md?page=1)

[Next page](https://community.thunkable.com/t/the-airtable-api-a-more-efficient-way-to-integrate-airtable-with-thunkable/1021167.md?page=3)
