# \[Solved\] Retrieving an old record in spreadsheet

**URL:** https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384
**Category:** Questions about Thunkable X
**Tags:** firebase, solved, beginner, spreadsheets
**Created:** [July 25, 2022, 8:07pm UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384 "2022-07-25T20:07:44Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![versatile](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@versatile](https://community.thunkable.com/u/versatile)
#### Post date: [July 25, 2022, 8:07pm UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/1 "2022-07-25T20:07:45Z")

</div>

How can an existing user retrieve his/her username stored in the spreadsheet for the app…this is what I’ve tried so far …

The app will loop through the spreadsheet if current userid from Google firebase matches the one in the spreadsheet and then grab the corresponding Username stored for that ID and then stored it another Variable.  
So I account for a feedback to be sure,I mean to check if there’s any error,so I can an error response of (null)

Please help ``

---

<div class="post-metadata">

### Author: ![versatile](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@versatile](https://community.thunkable.com/u/versatile)
#### Post date: [July 25, 2022, 8:11pm UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/2 "2022-07-25T20:11:08Z")

</div>

![IMG_20220725_204730_060](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/2/125e99826e810b42d7501f0fddbc2764b11291a2.jpeg)

 ![IMG_20220725_204740_447](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/2/d2fbad10b0426499793e98261dc8fcf10d34086d.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: [July 25, 2022, 8:11pm UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/3 "2022-07-25T20:11:47Z")

</div>

Can you provide an example? Your description is not clear to me.

---

<div class="post-metadata">

### Author: ![versatile](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@versatile](https://community.thunkable.com/u/versatile)
#### Post date: [July 25, 2022, 9:15pm UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/4 "2022-07-25T21:15:12Z")

</div>

When a user signups the first time,they will be required to create their full name which will be saved in the spreadsheet,and their unique id stored too.now lets assume they change their phone,when signin back in as an existing user can be possible because of the Google Auth-signin feature right?  
So now i cannot expect them to create another Fullname into the spredsheet.  
so i want to check from the spredsheet with the Unique id stored,the users fullname and retrieve it back and store in a Variable to avoid multiple entries by same user

---

<div class="post-metadata">

### Author: ![versatile](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@versatile](https://community.thunkable.com/u/versatile)
#### Post date: [July 25, 2022, 9:23pm UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/5 "2022-07-25T21:23:20Z")

</div>

i will loop through a base first,if the Unique USERID[from google signin]stored from the previous Signup session =Currenet USERID also grab from the Signin component,and then grab a property of Username stored with unique ID…

I hope that makes sense a bit

---

<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: [July 26, 2022, 9:08am UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/6 "2022-07-26T09:08:57Z")

</div>

Are you trying to do a VLOOKUP @versatile?

Does this help you make progress at all?

> [@Performing a VLOOKUP in LocalDB](https://community.thunkable.com/t/performing-a-vlookup-in-localdb/66057):
>
> One of the most powerful features in Thunkable is the new [LocalDB](https://docs.thunkable.com/thunkable-cross-platform/create/components/data/local-db) component, which allows you to insert a mini-spreadsheet directly into your app. This might be the first of a larger series of tutorials mimicking features found in other spreadsheets, but for now let’s get started with VLOOKUP. question What is VLOOKUP? A [VLOOKUP](https://support.office.com/en-us/article/vlookup-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1), or vertical lookup, allows you to search vertically down through a column of data and then find a corresponding value in your target row art Design Let’s start…

---

<div class="post-metadata">

### Author: ![versatile](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@versatile](https://community.thunkable.com/u/versatile)
#### Post date: [July 29, 2022, 4:45am UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/7 "2022-07-29T04:45:37Z")

</div>

Didn’t work out for it

---

<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: [July 29, 2022, 10:16am UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/8 "2022-07-29T10:16:17Z")

</div>

If you use a `count with` rather than a `for each` loop then this will be a lot easier to implement

---

<div class="post-metadata">

### Author: ![versatile](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@versatile](https://community.thunkable.com/u/versatile)
#### Post date: [July 29, 2022, 3:47pm UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/9 "2022-07-29T15:47:19Z")

</div>

Am not sure I quit understand that,or how to do it

---

<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: [July 29, 2022, 6:51pm UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/10 "2022-07-29T18:51:10Z")

</div>

You’re just going through the list one item at a time right now. There’s no (easy) way use the item to look up a value in an adjacent column.

If you swap to the “count with i” approach then I corresponds to the row number so you can retrieve values from any columns in that row.

Did you have a chance to work through the tutorial I linked you to previously?

---

<div class="post-metadata">

### Author: ![versatile](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@versatile](https://community.thunkable.com/u/versatile)
#### Post date: [August 3, 2022, 7:28am UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/11 "2022-08-03T07:28:46Z")

</div>

I just found out how to do that,  
I called the spreadsheet,and then loop through the base, saying if CurrentUserID stored in a variable=any ID in the spreadsheet column for IDs,it should then grab the property of the user’s username stored in previously to the spreadsheet and store it in a variable that will reveal it in the App  
Below is the blockings

 ![Screenshot_20220803-080816](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/3/9341969d5c9e73ed2020b1edee21fc32cc8bc7da.png)

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [November 1, 2022, 7:29am UTC](https://community.thunkable.com/t/solved-retrieving-an-old-record-in-spreadsheet/1975384/12 "2022-11-01T07:29:26Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
