# How to get the name of folder having sub-folder in it from realtime DB to thunkable

**URL:** <https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627>\
**Category:** Questions about Thunkable X\
**Created:** [June 13, 2021, 5:55pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627 "2021-06-13T17:55:27Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 13, 2021, 5:55pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/1 "2021-06-13T17:55:27Z")

</div>

Hi  
I am working on a project where the folders that I have in the database has subfolder in it, as a result, I am unable to extract only the names of the folder in a list. Can anyone help?  
The link of my database and the output I am getting in thunkable is attached below.  
Database snipet

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

Output in thunkable

![WhatsApp Image 2021-06-13 at 11.09.25 PM (1)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/1/d1c1881c5800888e4402243d9a6f5970168e1095.jpeg)

---

<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:** [June 13, 2021, 6:01pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/2 "2021-06-13T18:01:51Z")

</div>

In the screenshot you posted, which word/node are you calling a “folder”?

---

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 13, 2021, 6:08pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/3 "2021-06-13T18:08:48Z")

</div>

THE OTHER WORLD is a folder and I want only that in my list.  
Suggest is the sub-folder due to which my list starts getting all other data as well.

---

<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:** [June 13, 2021, 6:30pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/4 "2021-06-13T18:30:40Z")

</div>

Okay so if Fantasy/ contained THE OTHER WORLD/ and HARRY POTTER/ (for example), then you’d want a list viewer to show:

THE OTHER WORLD \>

HARRY POTTER \>

Something like that?

There’s a recent topic about displaying Firebase nodes in a list viewer. I think @muneer posted a solution. I’ll see if I can find it.

---

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 13, 2021, 6:32pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/5 "2021-06-13T18:32:05Z")

</div>

Yes, this is what bI want.  
That would be great if you can provide the link to the solution. 🙂

---

<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:** [June 13, 2021, 6:33pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/6 "2021-06-13T18:33:25Z")

</div>

Here’s one related topic, for example:

> [@Read data from firebase and display in List Viewer](https://community.thunkable.com/t/read-data-from-firebase-and-display-in-list-viewer/1249776):
>
> Hi All, I know this is the most easiest one to get the output. For some reason I am stuck in retrieving the data from firebase and display it in listviewer but I am able to send message to the firebase. I have attached the screenshot as well as the project link. [https://x.thunkable.com/copy/9e1896e12314d25c6e5f0a5a783f37ea](https://x.thunkable.com/copy/9e1896e12314d25c6e5f0a5a783f37ea) Your assistance would be of great help. Regards, Sasi Preetha[[screenshot] ](https://x.thunkable.com/copy/9e1896e12314d25c6e5f0a5a783f37ea)

---

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 13, 2021, 6:43pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/7 "2021-06-13T18:43:12Z")

</div>

Thanks for the link. However, in the link the data we are retrieving does not have any sub folder/node in it as a result, it was getting viewed in the form of a list. However, in my project I have a sub folder named suggest, which is not letting me get the name of my folder in the list.  
Image of the output shown below

 ![etxt](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/2/9/29414435dac450c7dad7c62e0b2f06185f7e0908.jpeg)

---

<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:** [June 13, 2021, 6:53pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/8 "2021-06-13T18:53:02Z")

</div>

I’m confused about what data you want.

Please post an example of what a successful output would be from a list viewer. You can sketch it or make a mock up but without that, I’m not sure how to help you further.

---

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 13, 2021, 7:05pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/9 "2021-06-13T19:05:31Z")

</div>

![Capture](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/0/307b05fcfd4ef23670b92014e0790235a0c4deca.png)

I want my list should be like this:-

THE OTHER WORLD  
THE YELLOW CUPCAKE

However, I am getting the list like this:-  
 ![capture1](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/e/6e02947d7da3e3fa04147634ffa6acfa9fa9b853.png)

---

<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:** [June 13, 2021, 7:14pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/10 "2021-06-13T19:14:55Z")

</div>

Got it. I’ll be able to help you with this a little bit later.

---

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 13, 2021, 7:15pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/11 "2021-06-13T19:15:21Z")

</div>

Sure. Thank you!

---

<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:** [June 13, 2021, 9:25pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/12 "2021-06-13T21:25:21Z")

</div>

Try this:

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

Ignore the screen name. I was using it for something else with Google Sheets. But you can find the `cloud variable " "` block in the Variables drawer. It will say `app` but you can change the drop-down menu to `cloud`.

Cloud variables in Thunkable can be used to connect to a direct path in Firebase. You can get data that way or set it which would change the value in Firebase.

---

<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:** [June 14, 2021, 8:09am UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/13 "2021-06-14T08:09:12Z")

</div>

Using `stored variables` you can get the list you want with this

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

Using realtime component you can do this  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/0/b01168649a35720c4e60d8298439764c575738eb.png)

---

<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:** [June 14, 2021, 8:16am UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/14 "2021-06-14T08:16:25Z")

</div>

Thanks, I forgot the object properties block.

---

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 14, 2021, 8:55am UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/15 "2021-06-14T08:55:26Z")

</div>

It worked!!! I am so happy! Thank you for the solution. It’s easy and efficient. Thanks a lot! 🙂

---

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 18, 2021, 4:51pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/16 "2021-06-18T16:51:25Z")

</div>

One more query for the same project.  
What if I have to get the category from a variable. Can I join text and variable in cloud variable and get the list?  
An example given below:-

 ![Capturecloud](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/7/679361af1143e81daf567e036ce94944aa2e889a.png)

If no, then what can be the alternate?

---

<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:** [June 18, 2021, 5:25pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/17 "2021-06-18T17:25:10Z")

</div>

Yes you can.

However, you need to remember that the key values (folders) are case sensitive so “story” is not the same as “Story”. The same for the variables.

---

<div class="post-metadata">

**Author:** ![19manharan1fbs7](https://avatars.discourse-cdn.com/v4/letter/1/ecc23a/32.png) [@19manharan1fbs7](https://community.thunkable.com/u/19manharan1fbs7)\
**Post date:** [June 18, 2021, 5:28pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/18 "2021-06-18T17:28:47Z")

</div>

Ok thanks for the quick response. 🙂

---

<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:20pm UTC](https://community.thunkable.com/t/how-to-get-the-name-of-folder-having-sub-folder-in-it-from-realtime-db-to-thunkable/1342627/19 "2024-11-08T13:20:16Z")

</div>


