# How can i change Data viewer's datasource or table by code?

**URL:** <https://community.thunkable.com/t/how-can-i-change-data-viewers-datasource-or-table-by-code/588704>\
**Category:** Questions about Thunkable X\
**Tags:** question, data-viewer\
**Created:** [May 24, 2020, 6:00pm UTC](https://community.thunkable.com/t/how-can-i-change-data-viewers-datasource-or-table-by-code/588704 "2020-05-24T18:00:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorenzo\_Rinaldi](https://avatars.discourse-cdn.com/v4/letter/l/dfb087/32.png) [@Lorenzo\_Rinaldi](https://community.thunkable.com/u/Lorenzo_Rinaldi)\
**Post date:** [May 24, 2020, 6:00pm UTC](https://community.thunkable.com/t/how-can-i-change-data-viewers-datasource-or-table-by-code/588704/1 "2020-05-24T18:00:35Z")

</div>

Hi guys! I LOVE the new data viewers component. I’m making an app with more than 250 different datasheets. This is what i want:

-When button “Cookie” is pressed --\> Set Data\_viewer\_list/grid datasource to “Cookie”  
Or:  
-When button “USA” is pressed —\> Set Data\_viewer datasource to “America” AND set Data\_viewer selected table to “USA”  
Or:  
-When button “Dog” is pressed —\> Set Data\_viewer selected table to “Dog”

Is there a way to achive this? I didnt find any smart solution.

My solution is to use 250 (!!!) different Data\_viewer (with different datasource/tables) and use visible/not visible propriety but i think is not the optimal solution.

I’m making this question because I saw that i can use the ANY component to create/Delete Data\_viewer list/grid by code. How can i manage them and change their proprieties by code?

I’m using airtable right now, but i can change it if necessary to achive my pourpouses.  
Thank you!!

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [May 24, 2020, 9:18pm UTC](https://community.thunkable.com/t/how-can-i-change-data-viewers-datasource-or-table-by-code/588704/5 "2020-05-24T21:18:08Z")

</div>

Hi @Lorenzo_Rinaldi,

This isn’t quite possible. I haven’t been keeping up very much with the progress of this component, though there is a topic created on the Data Viewer in community, you might get some luck with an answer there.

> [@tada Latest Thunkable ✕ Release; NEW COMPONENTS Data Viewer List and Data Viewer Grid! 2020-05-05](http://community.thunkable.com/t/latest-thunkable-release-new-components-data-viewer-list-and-data-viewer-grid-2020-05-05/564204):
>
> Transform Data into Native Mobile Apps - no code needed. We’ve been making a lot of updates to the platform recently, and we have a lot more planned, but it’s great to officially announce two amazing new no-code, User Interface components for you today. [Data Viewer List](https://docs.thunkable.com/data-viewer-list) & [Data Viewer Grid](https://docs.thunkable.com/data-viewer-grid) You can find these new Data Viewers in your UI components right now. [data\_viewers] Thank you beta testers! To begin, we have to say a big “Thank You” to the 100 or so community members who helped [with tes…](http://community.thunkable.com/t/would-you-like-to-beta-test-the-new-data-viewer-component/469832)

Another place to try having a look is [Thunkable GitHub](https://github.com/thunkable/thunkable-issues/issues). If you see the feature requested, give it a +1 or a comment saying you’d like this too, or if you don’t see it you could create a feature request 🙂

A temporary solution to this for you could be to use [cloning](https://docs.thunkable.com/any-component-blocks#the-clone-item-block) and have all the data in one spreadsheet (sort it by a tag). This is kind of like a DIY list, which you have full control over. It is slightly more limited than a real list as sometimes when cloning a lot of items, _lag_ may occur, so be weary of that. This would only work with [Airtable](https://docs.thunkable.com/spreadsheet) or the in-app [Local-DB](https://docs.thunkable.com/local-db), as Google Sheets is currently exclusive to the Data Viewers.

---

<div class="post-metadata">

**Author:** ![Lorenzo\_Rinaldi](https://avatars.discourse-cdn.com/v4/letter/l/dfb087/32.png) [@Lorenzo\_Rinaldi](https://community.thunkable.com/u/Lorenzo_Rinaldi)\
**Post date:** [May 24, 2020, 10:00pm UTC](https://community.thunkable.com/t/how-can-i-change-data-viewers-datasource-or-table-by-code/588704/6 "2020-05-24T22:00:03Z")

</div>

Thank you for you answer. I need more than one big spreadsheet because a lot of people are working in this project with different software/settings and we update data more than twice a day. It’s really hard to collect all this data and paste it in a big datasheet every time. I will try to sumbit my request in the Github, thank you!

---

<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/how-can-i-change-data-viewers-datasource-or-table-by-code/588704/7 "2024-11-08T11:29:00Z")

</div>


