# \[Solved\] Count the number of Results and Display them

**URL:** https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459
**Category:** Questions about Thunkable X
**Tags:** solved
**Created:** [September 12, 2019, 3:17am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459 "2019-09-12T03:17:50Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Mike\_Fourway\_Flasher](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Mike\_Fourway\_Flasher](https://community.thunkable.com/u/Mike_Fourway_Flasher)
#### Post date: [September 12, 2019, 3:17am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/1 "2019-09-12T03:17:50Z")

</div>

So I am trying to figure out how to Count the number of times HAVEIT = true and then display the count. So far I am not having much luck… Can anyone point me in the right direction?

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

![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/a/ba1aef9ae25a6dd66073dc9b4463715856fbe052.png)

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [September 13, 2019, 8:56am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/2 "2019-09-13T08:56:11Z")

</div>

To get the value of a node, you must correctly specify the full path to this node. You have an incomplete path. How to find out the full path? In the Firebase console, open the node you need and see the full path to it, which will appear in the line above the data area.

---

<div class="post-metadata">

### Author: ![Mike\_Fourway\_Flasher](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Mike\_Fourway\_Flasher](https://community.thunkable.com/u/Mike_Fourway_Flasher)
#### Post date: [September 15, 2019, 6:14pm UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/3 "2019-09-15T18:14:39Z")

</div>

So I’ve got the right path to my node. Now how can I get the count of how many times the word TRUE appears?  
 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/5/2532705c74e50213be2bf1c9427abea8c39dd189.png)

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [September 15, 2019, 6:16pm UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/4 "2019-09-15T18:16:55Z")

</div>

See blocks for working with objects. They have a block to get a list of all the child nodes. Make a loop on this list and count the number of true values.

---

<div class="post-metadata">

### Author: ![Mike\_Fourway\_Flasher](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Mike\_Fourway\_Flasher](https://community.thunkable.com/u/Mike_Fourway_Flasher)
#### Post date: [September 16, 2019, 6:33am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/5 "2019-09-16T06:33:12Z")

</div>

I’m not sure where I’m going wrong,  
#1. ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/a/1ad9f120b660fb67ad1adf23554119c34f4bceb1.png)  
As I understand it, this should list my 3 results from my database.

![2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/c/fc889a2294b12e67f5a2a3e47041dec9d269d6ef.png)

However I am not getting any results when I test it…

 ![07](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/7/f79554acdc9200fa2f584a8a3ecf1ee8c4fc4299.png)

I can’t even get them to display, nevermind trying to count them.

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [September 16, 2019, 7:38am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/6 "2019-09-16T07:38:31Z")

</div>

You need to use the “get object from JSON” block, and not the “generate JSON from object” block.

---

<div class="post-metadata">

### Author: ![Mike\_Fourway\_Flasher](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Mike\_Fourway\_Flasher](https://community.thunkable.com/u/Mike_Fourway_Flasher)
#### Post date: [September 17, 2019, 4:38am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/7 "2019-09-17T04:38:21Z")

</div>

I feel like I’m so close tonight. I’m just missing something…  
 ![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/e/ce502fceaa9fb329173ccb39a6b03a8f506bd06f.png)

So far it is returning 0, I believe it should be returning 3…

 ![52](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/c/2c8340e67b7b9ce3ca91afa86caf7cab8f69d7e9.png)

---

<div class="post-metadata">

### Author: ![io.nut.ilie](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/io.nut.ilie/32/51367_2.png) [@io.nut.ilie](https://community.thunkable.com/u/io.nut.ilie)
#### Post date: [September 17, 2019, 7:40am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/8 "2019-09-17T07:40:50Z")

</div>

Hi.  
You have the solution in this video: [https://www.youtube.com/watch?v=QmkuI7iomlU](https://www.youtube.com/watch?v=QmkuI7iomlU)

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [September 17, 2019, 8:16am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/9 "2019-09-17T08:16:44Z")

</div>

You are using a block “generate JSON from object” for a list of objects. It is not right. “value” block already contains a list of objects, and it needs to be connected directly. Do you understand this?

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/a/0a71cbd2c2a51c1b1faa464cc5efbb78c9613e65.png)

for my data

![%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/5/45e83972008e4ed3f061080e3bfbd9936563c715.png)

---

<div class="post-metadata">

### Author: ![Mike\_Fourway\_Flasher](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Mike\_Fourway\_Flasher](https://community.thunkable.com/u/Mike_Fourway_Flasher)
#### Post date: [September 17, 2019, 2:28pm UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/10 "2019-09-17T14:28:50Z")

</div>

![1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/8/c87cfcb64629fc03f38bb08cd00969bab1e75f04.png)

I have changed my blocks as you have suggested, however my project returns nothing…

 ![32](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/4/c4939ac79c5a3fcf3f740dc6ef61051924213e07.png)

If I am doing something wrong, I cannot see it. My project is located here: [Thunkable](https://x.thunkable.com/projects/5d80ea20d3cd04e640f715ca/318e17e8-4a59-4484-8d23-a0718927cd5a/designer)

---

<div class="post-metadata">

### Author: ![Mark](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/mark/32/18133_2.png) [@Mark](https://community.thunkable.com/u/Mark)
#### Post date: [September 17, 2019, 5:47pm UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/11 "2019-09-17T17:47:01Z")

</div>

If I read your posts correctly then I believe that the value of the `"HAVEIT"` property will be the Logic value `true` or `false`, not the Text value `"true"` or `"false"`.

Hope this helps.

-Mark

---

<div class="post-metadata">

### Author: ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)
#### Post date: [September 18, 2019, 8:09am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/12 "2019-09-18T08:09:32Z")

</div>

You’re right. For this reason, before the block `get property HAVEIT` to insert a block `join` to convert a logical true in the string “true” to add it in ListViewer, and in block `if` instead of the block “true” use `true` block.

---

<div class="post-metadata">

### Author: ![Mike\_Fourway\_Flasher](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@Mike\_Fourway\_Flasher](https://community.thunkable.com/u/Mike_Fourway_Flasher)
#### Post date: [September 19, 2019, 3:09am UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/13 "2019-09-19T03:09:06Z")

</div>

Thank you very much guys. It worked. This thread is closed!

---

<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:08pm UTC](https://community.thunkable.com/t/solved-count-the-number-of-results-and-display-them/222459/14 "2024-11-08T12:08:56Z")

</div>


