# Merge tables into one List?

**URL:** <https://community.thunkable.com/t/merge-tables-into-one-list/2636497>\
**Category:** Questions about Thunkable X\
**Tags:** database, list, data-viewer\
**Created:** [October 10, 2023, 8:57am UTC](https://community.thunkable.com/t/merge-tables-into-one-list/2636497 "2023-10-10T08:57:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thomas.lorentzonsi](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@thomas.lorentzonsi](https://community.thunkable.com/u/thomas.lorentzonsi)\
**Post date:** [October 10, 2023, 8:57am UTC](https://community.thunkable.com/t/merge-tables-into-one-list/2636497/1 "2023-10-10T08:57:25Z")

</div>

I have a local database created with several tables. Is it possible to get all rows from all tables and put them into one list?

---

<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:** [October 10, 2023, 12:04pm UTC](https://community.thunkable.com/t/merge-tables-into-one-list/2636497/2 "2023-10-10T12:04:20Z")

</div>

Like a schemaless Json array?

---

<div class="post-metadata">

**Author:** ![thomas.lorentzonsi](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@thomas.lorentzonsi](https://community.thunkable.com/u/thomas.lorentzonsi)\
**Post date:** [October 10, 2023, 1:43pm UTC](https://community.thunkable.com/t/merge-tables-into-one-list/2636497/3 "2023-10-10T13:43:24Z")

</div>

Well an ordinary list would ok for me.

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 10, 2023, 6:07pm UTC](https://community.thunkable.com/t/merge-tables-into-one-list/2636497/4 "2023-10-10T18:07:28Z")

</div>

do all tables have same layout?  
do you care about the source of data? if you don’t, see combo. if you do, see combo2.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/1/41e5ffb46eca1c1d61198aae675f523bfd2010e7.png)

go over each table and build each row as a list. assign it to a variable, say row, then append the variable row to your destination table, which is actually a list. so you end up with a list of lists.

to process the data, treat it as a list - then treat each item in the list as ALSO a list.

---

<div class="post-metadata">

**Author:** ![thomas.lorentzonsi](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@thomas.lorentzonsi](https://community.thunkable.com/u/thomas.lorentzonsi)\
**Post date:** [October 10, 2023, 7:05pm UTC](https://community.thunkable.com/t/merge-tables-into-one-list/2636497/5 "2023-10-10T19:05:31Z")

</div>

Tables have the same layout so I would like to achieve what you have in Combo list. Any block example for this?

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [October 10, 2023, 7:39pm UTC](https://community.thunkable.com/t/merge-tables-into-one-list/2636497/6 "2023-10-10T19:39:41Z")

</div>

here’s the program to process CA and NY

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

here’s the 4th (hardcoded) entry in the resulting table  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/e/fe161a539bc5ff4abaaafe29c0bb08703ef25f40.png)

here’s the link to the project (see Screen 13)  
[https://x.thunkable.com/copy/9daca75fb92f2adc78894ab328ad71a7](https://x.thunkable.com/copy/9daca75fb92f2adc78894ab328ad71a7)

---

<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:** [January 8, 2024, 7:40pm UTC](https://community.thunkable.com/t/merge-tables-into-one-list/2636497/7 "2024-01-08T19:40:10Z")

</div>

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