# \[Solved\] Using VLookup in Airtable to display a picture

**URL:** https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499
**Category:** Questions about Thunkable X
**Tags:** solved, image, airtable
**Created:** [May 15, 2020, 5:11pm UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499 "2020-05-15T17:11:02Z")
**Posts on this page:** 8
**Page:** 1

<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 15, 2020, 5:11pm UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499/1 "2020-05-15T17:11:02Z")

</div>

Hi,

I have an Airtable database with Exercise names and corresponding images.

![2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/7/37130c49f966a2965e57a07dbbba629a5c899fba.png)

Now when a particular exercise name comes up on screen, I want to display that image from the Airtable.  
Theoretically, I am looping through the ExerciseName column and when a match happens, display that corresponding row in ExerciseGIF column.

 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/5062b1a817887b660a9e13580330510a6ad5e01e.png)

However, I am not getting the picture on screen. Please help correct the blocks.

Susovan

---

<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: [May 15, 2020, 5:40pm UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499/2 "2020-05-15T17:40:47Z")

</div>

See this post!

> [@Display images from airtable (10-min solve)](http://community.thunkable.com/t/display-images-from-airtable-10-min-solve/568568):
>
> I decided to tackle how to get images from airtable. [https://x.thunkable.com/copy/139eaa0b25b017f7e5d333f344dbe584](https://x.thunkable.com/copy/139eaa0b25b017f7e5d333f344dbe584) blocks used here are some notes! [\_remixThisProject](https://x.thunkable.com/copy/9cb95a696849675d7c5fff5b4207bf47)

---

<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 16, 2020, 7:53am UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499/3 "2020-05-16T07:53:27Z")

</div>

Hi Jared,

So I know how to get images from Airtable. If I specify the column and row, I am able to retrieve and display images. The following block is working since I know the exact row number.

 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/0/a0e0b966c85ded451128a99ad358d32933f48f68.png)

However, my problem is about picking the image when the row number is dynamic. For example, when the name on screen is Squat, I should be able to retrieve the image of the Squat.

---

<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 18, 2020, 4:01pm UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499/4 "2020-05-18T16:01:24Z")

</div>

@Mark could you take a look at this? Any help will be appreciated.

Susovan

---

<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: [May 18, 2020, 6:09pm UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499/5 "2020-05-18T18:09:08Z")

</div>

@thestrengthinstitute  
Retrieve the column of exercises. Search through the returned list for the first occurrence of that exercise,

that is the row number

[http://community.thunkable.com/t/performing-a-vlookup-in-localdb/66057?u=jared](http://community.thunkable.com/t/performing-a-vlookup-in-localdb/66057)

first  
save the active exercise to a variable named tempActiveExercise

then  
call airtable and get column ExerciseName, save this to a variable named allExerciseNames. now allExerciseNames is a **list** of all the cells (or exercises) in the column ExerciseName.

next

in **list** allExerciseNames, find the first occurence of tempActiveExercise

save this result to a variable named tempRowNumber

use tempRowNumber in your Airtable call to retrieve the image.

get cell  
in row (tempRowNumber)  
in column (“ExerciseGIF”)

### then i reread the entire post so i made this

 ![Screen Shot 2020-05-18 at 3.36.51 PM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/d/8d85927edf08bdd2a5a73bce42c62966cf464f55.png)

_[\_remixThisProject](https://x.thunkable.com/copy/9cb95a696849675d7c5fff5b4207bf47)_

---

<div class="post-metadata">

### Author: ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)
#### Post date: [May 18, 2020, 6:53pm UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499/6 "2020-05-18T18:53:42Z")

</div>

> However, I am not getting the picture on screen. Please help correct the blocks.

Susovan,

I think the problem might be that you are specifying the `rowNum` as a text string (i.e. `"i"`). It needs to be the variable named ‘i’ instead. Do do that you should pull the variable block from the “Variables” drawer on left side of the Blocks Editor and use that instead. It will look something like:

![Screen Shot 2020-05-18 at 11.51.00 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/6/2693d90f9eb3a906084aade6630ba18443e425c3.png)

Hope this helps.

-Mark

---

<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 22, 2020, 4:27am UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499/7 "2020-05-22T04:27:25Z")

</div>

Amazing!!! That worked.

 ![Untitled](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/d/8d047ae71fb26730584447370728c1ec4d3ea363.png)

Thanks @jared

---

<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:29am UTC](https://community.thunkable.com/t/solved-using-vlookup-in-airtable-to-display-a-picture/568499/8 "2024-11-08T11:29:05Z")

</div>


