# Get Airtable Column based on condition of another column and apply to list viewer

**URL:** <https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627>\
**Category:** Questions about Thunkable X\
**Tags:** design, airtable\
**Created:** [April 25, 2018, 9:36am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627 "2018-04-25T09:36:10Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [April 25, 2018, 9:36am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/1 "2018-04-25T09:36:10Z")

</div>

Hi All,

I have an Airtable spreadsheet that stores a users email address and other data they have submitted like an “Issue Title” - Users may have multiple submissions, meaning multiple “Issue Titles” per email address

I would like to be able to retrieve the multiple “Issue Titles” from the Airtable spreadsheet and place them in a list viewer if the users email address they used to login is equal to the email addresses found in the Airtable column?

I haven’t got any blocks that haven’t gotten me close, so apologies for not attaching,

Could anyone please assist?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [April 25, 2018, 9:59am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/2 "2018-04-25T09:59:40Z")

</div>

Hi Jacob111,

I correctly understand that the data structure is this:

email1 | message1  
email1 | message2  
email2 | message1  
email1 | message3  
email2 | message2  
email1 | message4

and you need to display in the application a list of all the messages of the selected email address?

Example 1

First, AirTable gets all the records and then we filter by the name of the address in the loop and display the resulting selection in the List Viewer.

Example 2

First from AirTable we get all the records and then send them to the Web Viewer where we process the sample using javascript and output it as an html-list or table in Web Viewer.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [April 25, 2018, 12:15pm UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/3 "2018-04-25T12:15:57Z")

</div>

The general solution of this problem can be as follows.

 ![gettablesdata](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/6/e6a4629a89686f8355c80d533da30d53f4fe6af3.png)

---

<div class="post-metadata">

**Author:** ![jacob1](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@jacob1](https://community.thunkable.com/u/jacob1)\
**Post date:** [April 25, 2018, 10:18pm UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/4 "2018-04-25T22:18:06Z")

</div>

Thanks actech, is there any other way without using custom json and just using a listviewer?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [April 26, 2018, 7:54am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/5 "2018-04-26T07:54:41Z")

</div>

Without JSON you can do without, then everything will become more complicated. The AirTable.GetAllRows method returns objects and you will need to manually convert them to text format, and then create a list from them and load it into the List Viewer.

In my example, we got \_item - a list of JSON strings. From this list, you can create your own list - in the loop, go through all the entries and add them to the List Viewer.

---

<div class="post-metadata">

**Author:** ![Julia\_Milan](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@Julia\_Milan](https://community.thunkable.com/u/Julia_Milan)\
**Post date:** [May 5, 2019, 10:45pm UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/6 "2019-05-05T22:45:34Z")

</div>

Hello, I’m having problems with something similar:

I have an Airtable spreadsheet with five columns of stored data, in the previous page one “value” of a list view is selected, now I need to search in the airtable all rows (in column 5) that have this value written.  
Next I’d like to display a List View of the items written in column 4 of these rows, but I have no idea how to do it,

Can someone help me please? ☹

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [May 6, 2019, 9:48am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/7 "2019-05-06T09:48:14Z")

</div>

Hello,

See an example of working on the scrAirTable screen from the project (do not use “remix” but open the project on the device, go to the AirTable screen, select items from the list.).

[https://x.thunkable.com/projects/5cc9570f7e2a78259a8c0a78/project/properties/designer/](https://x.thunkable.com/projects/5cc9570f7e2a78259a8c0a78/project/properties/designer/)

---

<div class="post-metadata">

**Author:** ![thestrengthinstitute](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@thestrengthinstitute](https://community.thunkable.com/u/thestrengthinstitute)\
**Post date:** [May 26, 2020, 9:25am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/8 "2020-05-26T09:25:32Z")

</div>

Hi @actech,

Can you help me with something similar?  
So I have a list L2 (taken from Column 1 of Airtable) from which I select an item.  
 ![3](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/00a892a940d71a24daecf9f29f8dd898b287c8d5.png)

This Item is also the names of Columns in same Airtable and is set in an app Variable **Level2Item**  
 ![2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/d/6d379b0009a9349c7874e11408f7a071df431172.png)

I am trying to display the column based on selection of L2. But its not working.  
 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/c/dc1d0a631dc97c99b3f5b7d4247b53bd92ef281c.png)

I think logic is OK since the list gets displayed when I hard-code the column name. Its not being able to understand the column name using Level2Item. What can I do?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [May 26, 2020, 12:26pm UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/9 "2020-05-26T12:26:11Z")

</div>

So, in hard coding, you use a literal and everything works, but when you use a variable, it doesn’t work.

What value do you set hard and what is the value of the variable in Level3Label.Text?

---

<div class="post-metadata">

**Author:** ![thestrengthinstitute](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@thestrengthinstitute](https://community.thunkable.com/u/thestrengthinstitute)\
**Post date:** [May 27, 2020, 5:28am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/10 "2020-05-27T05:28:07Z")

</div>

Hi @actech,

I hard-coded any of the column names from the table like “DOUBLE LEG”, “SINGLE LEG” etc and it worked.

So the Level3Label is getting the name properly.

 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/c/7cc02fb0b000f0293eda4b00d6079ea977582e20.png)

However, the same Level2Item is not being able to retrieve that column. Not sure why.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [May 27, 2020, 8:27am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/11 "2020-05-27T08:27:49Z")

</div>

Value of “error” block?

---

<div class="post-metadata">

**Author:** ![thestrengthinstitute](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@thestrengthinstitute](https://community.thunkable.com/u/thestrengthinstitute)\
**Post date:** [May 27, 2020, 8:31am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/12 "2020-05-27T08:31:05Z")

</div>

I haven’t set it to anything. What do you suggest I set it to?

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [May 27, 2020, 8:33am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/13 "2020-05-27T08:33:59Z")

</div>

Many purple blocks have a green “error” block. Always check its contents, and now tell me what is in this block - empty, error, or something else? **Output it to Labe** l

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [May 27, 2020, 8:37am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/14 "2020-05-27T08:37:41Z")

</div>

I can view your project, but to do this, I need a message personally for me, which will have a public link to your project (I can’t view private projects) and access fields to AirTable. If you don’t want to give me this information, I’m afraid I can’t help you any more, but I can advise you to do step-by-step debugging.

---

<div class="post-metadata">

**Author:** ![thestrengthinstitute](https://avatars.discourse-cdn.com/v4/letter/t/48db29/32.png) [@thestrengthinstitute](https://community.thunkable.com/u/thestrengthinstitute)\
**Post date:** [May 27, 2020, 9:44am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/15 "2020-05-27T09:44:28Z")

</div>

Hi @actech,

So after i printed error output to a label, it came as blank but the **block started working as needed**. Not sure what changed but that will do for now. Thanks for the help.

---

<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:28am UTC](https://community.thunkable.com/t/get-airtable-column-based-on-condition-of-another-column-and-apply-to-list-viewer/23627/16 "2024-11-08T11:28:56Z")

</div>


