# How to sort local data source before displaying it in Data Viewer List?

**URL:** <https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421>\
**Category:** Questions about Thunkable X\
**Created:** [January 28, 2024, 3:03pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421 "2024-01-28T15:03:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![undefined5](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@undefined5](https://community.thunkable.com/u/undefined5)\
**Post date:** [January 28, 2024, 3:03pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/1 "2024-01-28T15:03:46Z")

</div>

I have a local data source with 2 columns : a name and a number  
I set a Data list Viewer to display it. But if I understand info from forum we cannot sort DLV. So how can I sort my local data source (let say by name) prior to displaying it ?  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![Goldking](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/goldking/32/165073_2.png) [@Goldking](https://community.thunkable.com/u/Goldking)\
**Post date:** [January 28, 2024, 8:42pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/2 "2024-01-28T20:42:21Z")

</div>

You have to sort manually, save in a variable and then set to listview.  
There is also a block to sort in list block

---

<div class="post-metadata">

**Author:** ![undefined5](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@undefined5](https://community.thunkable.com/u/undefined5)\
**Post date:** [January 29, 2024, 6:05pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/3 "2024-01-29T18:05:05Z")

</div>

Thanks @Goldking .  
So when a user enter some names through Thunkable, I have no automatic way to sort it so that they are displayed in order ?

---

<div class="post-metadata">

**Author:** ![Goldking](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/goldking/32/165073_2.png) [@Goldking](https://community.thunkable.com/u/Goldking)\
**Post date:** [January 29, 2024, 6:18pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/4 "2024-01-29T18:18:16Z")

</div>

Make me an example of what you want to do , show me also an example of your database

---

<div class="post-metadata">

**Author:** ![undefined5](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@undefined5](https://community.thunkable.com/u/undefined5)\
**Post date:** [January 29, 2024, 8:06pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/5 "2024-01-29T20:06:10Z")

</div>

Hello @Goldking  
Here is my table user can feed in through a screen in the app with an ‘add’ button and a forms screen  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/a/7a71f504a7ce105e7f1cab5bf9827490be0c1fa8.png)

After validating a new book entry (saved in the table), I would like to just display all table’s entries (Name+Number of tomes) on a screen ordered by name  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![Goldking](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/goldking/32/165073_2.png) [@Goldking](https://community.thunkable.com/u/Goldking)\
**Post date:** [January 29, 2024, 10:14pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/6 "2024-01-29T22:14:09Z")

</div>

Hi, this is my way .  
**Edit**  
I don’t know why I worked with 4 columns but you can update directly the first 2 columns.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/8/78ef73fce610684a555517e40015263305901d7e.png)

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

---

<div class="post-metadata">

**Author:** ![Goldking](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/goldking/32/165073_2.png) [@Goldking](https://community.thunkable.com/u/Goldking)\
**Post date:** [January 29, 2024, 10:29pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/7 "2024-01-29T22:29:08Z")

</div>

In the add button you have to add a control for the empty textbox, I forgot it

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

---

<div class="post-metadata">

**Author:** ![undefined5](https://avatars.discourse-cdn.com/v4/letter/u/54ee81/32.png) [@undefined5](https://community.thunkable.com/u/undefined5)\
**Post date:** [February 3, 2024, 10:59am UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/8 "2024-02-03T10:59:40Z")

</div>

Goldking Thanks a lot !

---

<div class="post-metadata">

**Author:** ![Goldking](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/goldking/32/165073_2.png) [@Goldking](https://community.thunkable.com/u/Goldking)\
**Post date:** [February 3, 2024, 9:09pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/9 "2024-02-03T21:09:29Z")

</div>

Let me know if it works fine 👍🏻

---

<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 3, 2024, 9:10pm UTC](https://community.thunkable.com/t/how-to-sort-local-data-source-before-displaying-it-in-data-viewer-list/2807421/10 "2024-05-03T21:10:27Z")

</div>

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