# Firebase Lookup A B C D with Thunkable Drop downs and return E F G H from Firebase

**URL:** https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465
**Category:** Questions about Thunkable X
**Created:** [September 18, 2021, 8:37am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465 "2021-09-18T08:37:50Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![towball](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/towball/32/68409_2.png) [@towball](https://community.thunkable.com/u/towball)
#### Post date: [September 18, 2021, 8:37am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/1 "2021-09-18T08:37:50Z")

</div>

Hi  
I want Firebase to store 10 fields of data in a row or similar and there could be 1000 or more rows  
Lets say  
Make, Year, Model, Variant and 6 other bits of Info  
There are many Makes with many combinations  
In thunkable I need to create 4 drop down boxes where the user would enter a Make and Year of manufacture then Firebase returns in the third drop down, a list of Models, a Model is selected then firebase returns in the fourth drop down, a list of Variants.  
Once there is a match in Firebase of the first 4 fields I want to return the other 6 fields in Firebase to a list  
I am connected to firebase and have written a very simple save to Firebase using Join with Comma’s and Get from Firebase using a list and list from text to extract to a list

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

I dont want to store all this info in the phone or variables. Easier to update and manage all the combinations in Firebase…

Is Firebase able to offer this lookup type function and return more info based on a match

Regards  
Baz

---

<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: [September 18, 2021, 10:46am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/2 "2021-09-18T10:46:44Z")

</div>

Can you give an example so it becomes clear, at least to me, and I will make a sample project to reflect the requirement.

In short, Firebase is a JSON based database and you will need to look into things differently if you want to make the best use of it.

You will structure your data as blocks of `objects` and your rows and `object arrays / lists`.

This is how rows are saved in Firebase  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/2/82326cc3425cc92240cd1bad41e04507c82533c2.png)

Each row contains multiple pieces of information such as  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/f/af2324b8cd572f1de14a1a3afbb6792381157b76.png)

---

<div class="post-metadata">

### Author: ![towball](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/towball/32/68409_2.png) [@towball](https://community.thunkable.com/u/towball)
#### Post date: [September 18, 2021, 11:37am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/3 "2021-09-18T11:37:43Z")

</div>

Hi Muneer

Airtable might be a better tool for entering data and keeping it up to date

I need a similar principle to Redbook where you look up Make Model Year.  
[https://www.redbook.com.au/](https://www.redbook.com.au/)

My intention is to enter many many rows of data for each vehicle brand and return some very specific data if Make Model Variant and Year match

Once the Make Model Year and Variant match what I have already entered into Firebase or Airtable, then other fields are returned to Thunkable App and need to display in with a label and the data. Example Colour - White. Colour being a label and White being the data

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

Example  
1.Entering Jeep in the first drop down would then load the relevant options in the second drop down  
2. Options in next drop down might be - Grand Cherokee, Cherokee, Blackhawk  
3. Options in next drop down might be - 2014, 2015  
4. Options in next drop down might be - Petrol or Diesel

Once the match has been made with the above data then I want to return other information about the vehicle, another 6 fields of info

---

<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: [September 18, 2021, 11:59am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/4 "2021-09-18T11:59:59Z")

</div>

First of all, Firebase is catered for large volume and you can easily store and retrieve hundred of thousands of records with ease and relatively good speed.

Due to the fact that Firebase is JSON based and not relational SQL type of database, the data structure model is a bit different and for sake of speed you will need to allow duplication of data.

I will create a `data node` just to fill search fields and that is mainly for performance issues.  
The actual vehicles data will reside in a separate `data node` that can be looked up by the set of search fields presented. Under the `vehicle data node` I will create `sub-nodes` for each **Make** which will give me a performance advantage in searching for matched results.

---

<div class="post-metadata">

### Author: ![towball](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/towball/32/68409_2.png) [@towball](https://community.thunkable.com/u/towball)
#### Post date: [September 19, 2021, 6:29am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/5 "2021-09-19T06:29:59Z")

</div>

Thanks Muneer be a great help to get my head around it…

---

<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: [September 19, 2021, 7:11am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/6 "2021-09-19T07:11:35Z")

</div>

If I would build such an app, I would start structuring my DB with the following

- Common App Settings  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/b/5ba3c22270158f5c3f235ac00b1629ab07f6e447.png)  
This is to manage info in the app in a dynamic way.
- Look up tables/lists  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/7/17fd1f4c5fa84176eead3fbf45fda9a274b0ec04.png)  
For performance issues, I will have the information for the user choices and options in a separate key for the app to retrieve faster.
- Actual vehicle info  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/4/c4f3d6d5183463071932d49e9bbeb39805527ad6.png)  
This is the main `bucket` which will hold the major part of the info and is already separated by vehicle type again for performance purposes.

Of course this is only a start, as far as I understood of the case, and the more you get into the app itself you might need to add and go deeper in the node tree.

---

<div class="post-metadata">

### Author: ![towball](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/towball/32/68409_2.png) [@towball](https://community.thunkable.com/u/towball)
#### Post date: [September 21, 2021, 7:19am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/7 "2021-09-21T07:19:59Z")

</div>

Hi Muneer  
Looked at so many vids etc, still struggling a little. I can create the following but cant work out

- how to get another level or 2 ???

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

Like your image

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

Do you know of any Thunkable examples where I could view the blocks  
??  
Regards Barrie

---

<div class="post-metadata">

### Author: ![towball](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/towball/32/68409_2.png) [@towball](https://community.thunkable.com/u/towball)
#### Post date: [September 21, 2021, 9:38am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/8 "2021-09-21T09:38:13Z")

</div>

Hi Muneer  
I worked out how to create multiple nodes, found an article in thunkable community that helped me understand.

Long way to go as there is a lot more information I need to add. And then work out how to link the information

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

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

Regards

Baz

---

<div class="post-metadata">

### Author: ![towball](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/towball/32/68409_2.png) [@towball](https://community.thunkable.com/u/towball)
#### Post date: [September 26, 2021, 9:21am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/9 "2021-09-26T09:21:12Z")

</div>

HI Muneer  
I have spent hours reading threads on the community and having trouble getting my head around filtering data from FB. I am having trouble understanding the filtering and am in over my depth here…  
I was going to have 5 lists to get the first 5 pieces of information.  
Make, Model, Variant, Year, Fuel Type. Depending on what is selected then it will follow that NODE.  
The length of the text between each set of brackets will vary so I cant see how I can use Letter to Letter for the substring

I have managed to have a list retrieving the first node when screen starts (Kia)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/1/d1904ca5714e1c925395e58283da9b47bcaffe7c.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/9/a9c16e182043f0cc00a6d954633c89caffdd110d.png)

When I click on the list item I get everything after the first node but I only want (K2A)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1bcb9b7780cf26fb8880ecfe0d1d72505e277b95.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/d/ddfbf0ac3eb2815289618f4c1826045a155aca6a.png)

Can you assist as to how I might achieve this???

Here is the setup in FBase  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/4/94b7e7a1f040cff96e25133082b126916cd9f439.png)

---

<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: [September 26, 2021, 9:37am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/10 "2021-09-26T09:37:58Z")

</div>

To make a working example, I’ll use the data available in my Firebase and then you can just do the same but apply it to your structure

My FB is this way  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/5/c5d1d863b7334d1c979b8512546107a36fc70b0f.png)  
to get the data under the key `LookUps` in a `List Viewer`, I’ll do this

This is my output  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/5/356f2c0a57e7cd777e21b9fef7ef51d3e70d421f.png)

This is the code blocks  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/8/98cec3da05f903f64da993cd217a639e1835ef8e.png)

Hope this makes it easier

---

<div class="post-metadata">

### Author: ![ruanyixincc5](https://avatars.discourse-cdn.com/v4/letter/r/f08c70/32.png) [@ruanyixincc5](https://community.thunkable.com/u/ruanyixincc5)
#### Post date: [January 7, 2022, 8:37am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/11 "2022-01-07T08:37:22Z")

</div>

hello, I am a new hand of thunkable and I got some thunkable problems , I can not upload my data to real time database?Here is my topic address:

> [@Realtime Database does not work](https://community.thunkable.com/t/realtime-database-does-not-work/1667456):
>
> I swear I have obeyed every step the thunkable docs told me to establish a personal real time database. I have got the API Key and Database URL and filled in the App Setting on Thunkable,but still I can not upload or get my data from real time database,how could that happen?Where the problem is? [QQ截图20220107160840] [QQ截图20220107161537] [image]

Could you help me to solve this problem？Thank you very much

---

<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: [January 7, 2022, 8:41am UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/12 "2022-01-07T08:41:06Z")

</div>

Please don’t post the same question multiple times. If someone has an answer, they will respond to your original topic.

---

<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:15pm UTC](https://community.thunkable.com/t/firebase-lookup-a-b-c-d-with-thunkable-drop-downs-and-return-e-f-g-h-from-firebase/1512465/13 "2024-11-08T13:15:12Z")

</div>


