# Filtering through document based upon requirment

**URL:** <https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604>\
**Category:** Questions about Thunkable X\
**Created:** [January 14, 2024, 1:05am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604 "2024-01-14T01:05:56Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [January 14, 2024, 1:05am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/1 "2024-01-14T01:05:56Z")

</div>

I am trying to make a code so that the user selects a name and for that name an ID is hidden in the backround. I am trying to get data from a sheet based upon my ID that is saved by the name that the user selects.

This is my sheet for the name and the ID’s.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/d/2d69488902158730d26e5b575fcf93c6e6649aa3.png)

This is my sheet with the number that I need to pull data from

 ![Screenshot 2024-01-13 190511](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/0/50726dcd0950ae3ca6cac809f0e8ae5ca2955baa.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:** [January 14, 2024, 3:48am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/3 "2024-01-14T03:48:45Z")

</div>

Please give an example with real values from your data source.

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [January 15, 2024, 10:57pm UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/4 "2024-01-15T22:57:25Z")

</div>

So these are my values from my data source. I will try to explain what I am trying to do better. Whenever the user goes to my app and registers a student, they will be requested to choose a class from a list that contains the 3 items that are in the first sheet. These are my 3 classes. Now, what I am trying to do is, on a different other page. When the user selects the items from the dropdown, it should save the name in the label visible to the user **and** save in a invisible label the ID that is associated with each class. Until this part is which I have successfully coded. Now, based on the ID that is saved in the invisible label, I want to get all the data from the 2nd page that have that specific ID in the 2nd column.

---

<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:** [January 16, 2024, 12:13am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/5 "2024-01-16T00:13:32Z")

</div>

What I meant when I said an example with real values was something like this:

The user selects “103” from the first column and I want to display “Ven, Black.”

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [January 16, 2024, 12:26am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/6 "2024-01-16T00:26:27Z")

</div>

Ah ok, thank you for clarifying.

When the user goes to my app and clicks search screen, a list with the classes pop’s up.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/4/249959018234eaaebfb5515c0e375b64d104cf5d.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/3/c3b6e66dfb8a396e88df081aba86e974cc0f4959.png)

When any one of these options is clicked on and then the Search Button is clicked, the label next to the search button houses the class ID.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/a/6a008ca2b24eaf7f84e5ddcff0723963e488e70c.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/d/9d8a480763f32e039770c1e78db3b3c65f9df6fd.png)

When the last button, the Submit Changes button is clicked, then a list is supposed to show up with all the names associated with that specific value.

 ![Screenshot 2024-01-15 182454](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/9/e9c85dc8c699bdd75bfcce3e4b93f71c285bdf89.png)

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [January 16, 2024, 12:27am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/7 "2024-01-16T00:27:04Z")

</div>

However, another issue that I am having is that as soon as the sheet that is supposed to house the data appears, it dissapears.

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [January 16, 2024, 12:27am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/8 "2024-01-16T00:27:51Z")

</div>

Here is an example of my code.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/8/089bbd6439a61dc45a04452e64d92bdf73b42576.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:** [January 16, 2024, 5:18am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/9 "2024-01-16T05:18:35Z")

</div>

> [@nascentaa0obfo](#):
>
> However, another issue that I am having is that as soon as the sheet that is supposed to house the data appears, it dissapears.

I have no idea what that means, I’m sorry. Can you provide a screencast video of that?

Something to consider is that using stored variable blocks is really slow compared to app variables. So your loop is going to take a long time.

When I need to get the value of a stored variable, I set an app variable with the same name to the value of the stored variable and then use the app variable block throughout my code. I only use the stored variable blocks when _setting_ the value of a stored variable.

What happens if you add a Wait block inside of your loop so you can see the values that are displayed as the loop runs? Because it’s possible that the label’s text is changing quickly so you can’t see the last value.

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [January 24, 2024, 2:49am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/10 "2024-01-24T02:49:03Z")

</div>

Thank you for your input.

I tried transferring the data from the stored variable to an in app variable, however, the data does not seem to change. The same error of the label block disappearing happens over and over again.

As requested, here is a video recording of that. [Thunkable on Vimeo](https://vimeo.com/905827928?share=copy)

-Thank You

---

<div class="post-metadata">

**Author:** ![samclever](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@samclever](https://community.thunkable.com/u/samclever)\
**Post date:** [January 24, 2024, 3:49am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/11 "2024-01-24T03:49:53Z")

</div>

So after watching your screencast I am not sure what is supposed to be displayed. Is the user supposed to see the whole spreadsheet with their name in the list? Are you using a data list viewer to display the info that is disappearing?

---

<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:** [January 24, 2024, 7:01am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/12 "2024-01-24T07:01:47Z")

</div>

Can you share a screenshot of the blocks for your Submit Changes button? If that’s what’s causing the problem then we would need to see that, too.

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [January 25, 2024, 2:47am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/13 "2024-01-25T02:47:08Z")

</div>

The user is supposed to see all the data from every single row which houses the number that you see after I click “Travisso”.

I used a data list viewer and a normal list viewer and this problem still happened.

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [January 25, 2024, 2:53am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/14 "2024-01-25T02:53:29Z")

</div>

The code snippet above is actually the same one which I am using. I just wanted to try showcasing the data in a different page and trying to see if it fixes the problem, which it unfortunately does not.

---

<div class="post-metadata">

**Author:** ![samclever](https://avatars.discourse-cdn.com/v4/letter/s/ec9cab/32.png) [@samclever](https://community.thunkable.com/u/samclever)\
**Post date:** [January 25, 2024, 11:09pm UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/15 "2024-01-25T23:09:43Z")

</div>

Im not sure how you have the height width settings set but I’ve found sometimes setting multiple items to ‘fill parent’ makes them disappear. Not sure if its even related but might be worth a shot to try and set the width and height of the list viewer (or column/row it is within) to a set number slightly smaller than the screen size and see if data appears.

---

<div class="post-metadata">

**Author:** ![nascentaa0obfo](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nascentaa0obfo](https://community.thunkable.com/u/nascentaa0obfo)\
**Post date:** [February 7, 2024, 2:36am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/16 "2024-02-07T02:36:04Z")

</div>

Thank you for the input, I appreciate it. I have never actually used or known that that the “fill parent” fucntion is possible, so I dont think that is the problem, but thank you for pointing that out.

---

<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:** [May 7, 2024, 2:36am UTC](https://community.thunkable.com/t/filtering-through-document-based-upon-requirment/2781604/17 "2024-05-07T02:36:46Z")

</div>

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