# How to update cells in Data Source (rowID)

**URL:** <https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249>\
**Category:** Questions about Thunkable X\
**Created:** [December 16, 2020, 7:32am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249 "2020-12-16T07:32:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![slothball](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@slothball](https://community.thunkable.com/u/slothball)\
**Post date:** [December 16, 2020, 7:32am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/1 "2020-12-16T07:32:27Z")

</div>

I am trying to display sorted data using the Data List Viewer. I want to use the data list viewer to show the data rather than using List Viewer because I want to be able to take advantage of the display options and swipe features in the data list viewer.

I have a bunch of values stored as a list in a variable. I want to write that list into a column in a Data Source table so that it can be displayed in the data list viewer. However, I do not see how to do this. Where do I find out what the rowID is for the cells in the Data Source? Is there a way to write the data in the list to a row using a loop?

Any help gratefully received!

---

<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:** [December 16, 2020, 7:54am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/2 "2020-12-16T07:54:44Z")

</div>

The click event gives the rowID of the row you are selecting.

---

<div class="post-metadata">

**Author:** ![slothball](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@slothball](https://community.thunkable.com/u/slothball)\
**Post date:** [December 16, 2020, 8:12am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/3 "2020-12-16T08:12:50Z")

</div>

Thanks @muneer (again!). So it seems I can’t write data directly into a specific cell of the Data Source?

---

<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:** [December 16, 2020, 8:36am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/4 "2020-12-16T08:36:44Z")

</div>

Yes you can, using the rowID you can [update] any cell.

---

<div class="post-metadata">

**Author:** ![slothball](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@slothball](https://community.thunkable.com/u/slothball)\
**Post date:** [December 19, 2020, 3:01am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/5 "2020-12-19T03:01:22Z")

</div>

As I understand it, you can only write data into a cell using the block that requires a click event. I want to write a list of data into a data source column but this does not seem to be possible.

---

<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:** [December 19, 2020, 3:50am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/6 "2020-12-19T03:50:15Z")

</div>

Of course it is possible. If you can explain your requirements in more details and/or provide screenshot of your blocks you will find many in the community who can help you achieve what you want.

---

<div class="post-metadata">

**Author:** ![slothball](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@slothball](https://community.thunkable.com/u/slothball)\
**Post date:** [December 21, 2020, 2:44pm UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/7 "2020-12-21T14:44:49Z")

</div>

I have a list stored in a variable. The list has been sorted according to a user preference. At the moment, that list is displayed using the List Viewer. However, it would be much better if I could transfer the list in that variable into a column in a Data Source so I could display it using the Data Viewer. My question is what blocks do I use to transfer the list from the variable into the Data Source. When I look at the Data Source blocks I do not see a way of doing it. If there is a way to do this, it would be great if you could explain or point me in the right direction. Thanks!

---

<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:** [December 21, 2020, 7:30pm UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/8 "2020-12-21T19:30:00Z")

</div>

You will need to create a data source and have the user preferences in this data source. You can then use a block in the data source drawer called [List of values] to get all the data available in the data source. You can then assign a list variable the values in the data source.

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

This will load all the items in the data source into the variable list so you can use it later in your code.

---

<div class="post-metadata">

**Author:** ![slothball](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@slothball](https://community.thunkable.com/u/slothball)\
**Post date:** [December 22, 2020, 8:57am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/9 "2020-12-22T08:57:09Z")

</div>

I think this doing the inverse steps that I want to do. I want the app to sort a list into a variable and then transfer that list into a column in the Data Source. The list will keep changing and so the data source would need to be updated constantly. What I think you are describing is entering data into the data source first and then calling that data using a variable?

The only data block I can see where you can write data to the Data Source (rather than creating the data in a separate table beforehand) is the ‘Set Cell’ block, but that only seems to fire when there is a click event.

The reason for asking about this is to use Data Viewer instead of List Viewer to show certain data in a list. At the moment, the List Viewer shows my list variable nicely. However, it would be much better in terms of functionality if I could have the Data Viewer view the list so that the user can then swipe left/right to perform other functions. As far as I can tell, there is no way to swipe left/right on a list viewer item.

---

<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:** [December 22, 2020, 10:15am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/10 "2020-12-22T10:15:10Z")

</div>

I apologize for the misunderstanding.  
I’m out now but when I go back to my computer, I’ll send you the blocks that should perform what you just described. 😇

---

<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:** [December 22, 2020, 11:58am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/11 "2020-12-22T11:58:49Z")

</div>

@slothball  
I assumed you already have your choices in a list so you need to loop through the list to add the the contents of the list to the Local Data Source.

You might also need to use [Delete All Rows] block to clear the Local Data Source when needed.

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

Let me know if you want further explanation.

---

<div class="post-metadata">

**Author:** ![slothball](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@slothball](https://community.thunkable.com/u/slothball)\
**Post date:** [December 23, 2020, 3:39am UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/12 "2020-12-23T03:39:16Z")

</div>

@muneer - thank you so much for helping to explain how these blocks work. I really appreciate it! I will see if I can get this to work.

---

<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, 12:19pm UTC](https://community.thunkable.com/t/how-to-update-cells-in-data-source-rowid/1037249/13 "2024-11-08T12:19:31Z")

</div>


