# Showing/hiding records in Data Viewer based on keyword in a specified column

**URL:** <https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060>\
**Category:** Questions about Thunkable X\
**Tags:** beginner, spreadsheets, data-viewer\
**Created:** [January 26, 2021, 6:12pm UTC](https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060 "2021-01-26T18:12:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hazhalim](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hazhalim/32/94530_2.png) [@hazhalim](https://community.thunkable.com/u/hazhalim)\
**Post date:** [January 26, 2021, 6:12pm UTC](https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060/1 "2021-01-26T18:12:16Z")

</div>

Hey y’all,

Recently, I tried to make a Data Viewer List (with Google Sheets) for my project with filters (using switches)… I’ve never done this before so I was kind of just trying to butcher it and see if it could work. So how it was supposed to work is that if say this switch was turned on and it was for finance related searches, then then when the DVL loads it will search whether the rows has the keyword “Financial” in column “ResourceType”, and if this were true then i would set the visible property to true and if not then it would set the visible property to false. Well, that did not work at all and the DVL was still showing all records so I was hoping you guys could help me and tell me what is wrong with it 😅

 ![dvl](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/7/976b289e6389df76c5fc0af698b8eeb46f91b689.png)

Yes, I know similar topics do exist but l felt confused looking at the sample project solutions and was really you guys would help explain to me how this works…

Thank you so much and sorry in advance 😅

---

<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:** [January 26, 2021, 8:09pm UTC](https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060/2 "2021-01-26T20:09:42Z")

</div>

See this sample project

[https://x.thunkable.com/projectPage/5fb9fb1dbfeb240011084d78](https://x.thunkable.com/projectPage/5fb9fb1dbfeb240011084d78)

The idea here is to get the selected criteria and then loop through the main table selecting only the rows that fit the criteria and append them to the table bound to the Data Viewer List which will display the selected rows.

---

<div class="post-metadata">

**Author:** ![hazhalim](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hazhalim/32/94530_2.png) [@hazhalim](https://community.thunkable.com/u/hazhalim)\
**Post date:** [January 27, 2021, 2:54am UTC](https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060/3 "2021-01-27T02:54:08Z")

</div>

Wow, thank you so much Muneer! 😁

How would you do this for multiple keywords? Like if I wanted to see data that has the value “Financial” or “Info” in the “ResourceType” column.

I just spent around 2 hours figuring out how to do that and for my latest try I tried reusing the idea from your sample project and tried to loop for multiple criterias while in the loop for checking all the rows:

 ![Screenshot 2021-01-27 at 11.02.17 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/0/b0420c4e5060843d5c26474618770d349e0eaf34.png)

I put the criterias in a list to loop them later on:

 ![Screenshot 2021-01-27 at 10.39.50 AM](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/7/57c265213bf38520136f95d3d5daca1aba79d37f.png)

Well, the result was 50/50 and while some data was working as expected some also absolutely did not show at all even when it was supposed to.

I would be very glad if you would explain to me what went wrong 😅

Thanks again 😀

---

<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:** [January 27, 2021, 6:44am UTC](https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060/4 "2021-01-27T06:44:52Z")

</div>

I added a new screen in the project. you need to click the link again so you can get the updated project.

Let me know if this is what you want.

---

<div class="post-metadata">

**Author:** ![hazhalim](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/hazhalim/32/94530_2.png) [@hazhalim](https://community.thunkable.com/u/hazhalim)\
**Post date:** [January 27, 2021, 9:37am UTC](https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060/5 "2021-01-27T09:37:27Z")

</div>

Yes, yes, yes, this was exactly what I needed!

While there seems to be output lag it’s easily hideable with wait blocks and loading icons 😀

Thank you so so much for the big help, @muneer ! 😁 😁

---

<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:** [January 27, 2021, 10:50am UTC](https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060/6 "2021-01-27T10:50:26Z")

</div>

Glad it helped you. The code can be optimised and would work faster. My intention is to get the workaround functioning and the speed comes later.

---

<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, 1:30pm UTC](https://community.thunkable.com/t/showing-hiding-records-in-data-viewer-based-on-keyword-in-a-specified-column/1070060/7 "2024-11-08T13:30:32Z")

</div>


