# Boolean object for Dataviewer list

**URL:** https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106
**Category:** Questions about Thunkable X
**Tags:** data-viewer
**Created:** [July 26, 2021, 2:10pm UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106 "2021-07-26T14:10:41Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [July 26, 2021, 2:10pm UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/1 "2021-07-26T14:10:41Z")

</div>

Hi,  
I’d like to show some boolean values from a DB in a datalist or datagrid.  
How can I do it?  
It seems that a button can’t be linked to any data from data source so it is not a real boolean object but act only as a trigger.  
So I’ve tried to simulate it using a label but I don’t want to show 0 or 1 like the stored value but a color or a letter basing on the boolean value.  
For example 0 matches with a X or a red background or both  
1 matches with a V or a green background or both.  
Is it possible with dataviewer component or should I have to make my list using cloning function and if cases to convert boolean?

---

<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: [July 26, 2021, 3:33pm UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/2 "2021-07-26T15:33:37Z")

</div>

Can you add another column in your table which you fill with the required information and use it in the DVL.

For example if the Boolean column is 0 then this column should be X. You will do that as part of the “save” function in your code.

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [July 27, 2021, 6:08am UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/3 "2021-07-27T06:08:06Z")

</div>

> [@muneer](#):
>
> he Boolean column is

So you are confirming that there is no way to have a boolean object getting values from DB but I always have to insert some code to manipulate it (in DB or in thunkable), right?  
No way to have a check box or something similar without inserting a loop for every record.

---

<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: [July 27, 2021, 9:22am UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/4 "2021-07-27T09:22:15Z")

</div>

No, I’m not saying this. I’m saying there is a valid way that you can use existing DVL (Data Viewer List). To check if the Boolean can be linked in DVL you need to create a custom one with a `switch` and then bind it with the right column. This is too much to do. That is all what I’m saying.

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [July 27, 2021, 9:27am UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/5 "2021-07-27T09:27:00Z")

</div>

> [@muneer](#):
>
> e right colum

SWITCH! Oh my GOD SWITCH is the magic word!  
Maybe this is the element i was searching for.  
I’ve searched for Checkbox, indicator, led, but not for switch.  
I’ll have a try 😉

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [July 27, 2021, 9:52am UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/6 "2021-07-27T09:52:10Z")

</div>

Too early ☹

I’ve tried with a switch, but when i click the switch every switch of the list change values!!  
Take a look here:  
[Thunkable](https://x.thunkable.com/copy/8bbf979843c26b41edf4ffa8774e557f)\<  
Moreover it seems not to trigger the item click even if I click on the label

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [July 27, 2021, 10:13am UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/7 "2021-07-27T10:13:25Z")

</div>

This isn’t quite right but it’s getting closer…

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

---

<div class="post-metadata">

### Author: ![Giuseppe\_Geppo\_Catta](https://avatars.discourse-cdn.com/v4/letter/g/2acd7d/32.png) [@Giuseppe\_Geppo\_Catta](https://community.thunkable.com/u/Giuseppe_Geppo_Catta)
#### Post date: [July 27, 2021, 10:16am UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/8 "2021-07-27T10:16:03Z")

</div>

But in my effective list I have more than 20 items ☹

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [July 27, 2021, 5:11pm UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/9 "2021-07-27T17:11:33Z")

</div>

I thought the first block alone (with the row id’s value) would be enough for it didn’t seem to work for me. A loop might be needed but I couldn’t figure out how to properly reference the row id of each of the other rows.

---

<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: [July 27, 2021, 5:17pm UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/10 "2021-07-27T17:17:16Z")

</div>

I’ve noticed when `Button` or `Switch` was added to the DVL, it prevented any action in the `Item Click`. I tried in a number of ways. The same code works for a label but does not have any effect when one of these components is added.

I tried using the `Button Click` but it seems it can only execute something outside of the DVL and does not make any effect on the components inside the DVL.

I might be mistaken or confused but this is what I observed so far.

---

<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:17pm UTC](https://community.thunkable.com/t/boolean-object-for-dataviewer-list/1415106/11 "2024-11-08T13:17:47Z")

</div>


