# Find specific item in list Firebase

**URL:** https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404
**Category:** Questions about Thunkable X
**Created:** [April 27, 2021, 12:04pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404 "2021-04-27T12:04:07Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 27, 2021, 12:04pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/1 "2021-04-27T12:04:07Z")

</div>

Hi.

I have built an app which I now have finished, so now I thought I would “re-build” it, just for learning practice, and this time I want to use Firebase instead of Airtable which I had for the previous version.

And with Airtable I learned that if I wanted to get a specific value from a specific row in Airtable, I could use “\_id”.

But how can I do with Firebase?

I am trying to add a delete function from my dataViewerList by swipe to Left.

I followed a tutorial that said I could simply add “null” as the value in my Saving-block for the RealTimeDataBase. But when I do so it will remove ALL my items. Does anyone have any tips to me how I can do this?

This is How this tutorial shows:

 ![Screenshot 2021-04-27 at 13.37.07](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/2/02bc39aba45b240f58a8efe769dcb1fae6512fea.png)

This is how I do:

 ![Screenshot 2021-04-27 at 13.45.27](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/e/0e7639c1d68f2a6b179d11ad8f570823f907bdd7.png)

So in the tutorial only one (the desired) item gets deleted.  
In my app the whole list gets deleted.  
But I can’t figure out what’s the different…And I can’t see how my Realtime data base would know what item this row ID in me DVL is…

How would you have done? Any tips?

(“SyncWithDB” is a function I made that ensures that everything in my Firebase list is synced and viewed in my DataViewerList as well).

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: [April 27, 2021, 1:13pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/2 "2021-04-27T13:13:48Z")

</div>

DVL requires a table (google sheet, Airtable, Local Storage) and **cannot** connect to FB. Can you explain how you did the connection so I can suggest something.

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 28, 2021, 7:05am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/3 "2021-04-28T07:05:07Z")

</div>

Hi

Yes I know that but I managed to “transfer” the data from FB to a local list that I am using for DVL.  
I used this:

 ![Screenshot 2021-04-28 at 09.01.53](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/a/7a4324acbc6d8c28b525b5cd8d6f956c60196a5d.png)

And when Saving an item I used the FB Save block followed by this function to get it views in my DVL as well. That seam to work for me.

But now I want to delete and edit these items as well…(hm…) Cant figure out how.

Hope you can give me some ideas.

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: [April 28, 2021, 7:11am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/4 "2021-04-28T07:11:23Z")

</div>

when you use the `Get object properties of` then it means that these properties (keys) have sub-keys.

When you want to delete/edit you need to go down to the sub-key otherwise you will overwrite the key and all keys under it.

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 28, 2021, 7:25am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/5 "2021-04-28T07:25:34Z")

</div>

Ok I understand, but I have a bit trouble understanding the very last key to specify this actual specific item.

I guess these are my sub-keys?

AppVariabvleUser\_ID  
Items

 ![Screenshot 2021-04-28 at 09.16.45](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/0/4083af266682f81efe8f3c845a024c3cc172c03c.png)

But the very last part in that “join-block” is where I get confused. It feels like I need some kind of id here? Like the “\_id” for Airtable…?

This is how my Realtime Database looks like in FB:

 ![Screenshot 2021-04-28 at 09.20.05](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/3/030d673c3f4d1497cf21daa74eca2aa6346e8239.png)

Any ideas?

The tutorial I followed said I could use this same “Save-block” for my deleting but change the value to “NULL”. That works for him but when I do this everything under my Items-key gets deleted.I have also seen other guides that recommend this or using an empty string… none of these works for me though.

---

<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: [April 28, 2021, 7:35am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/6 "2021-04-28T07:35:40Z")

</div>

Looks OK according to the data presented.

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 28, 2021, 7:36am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/7 "2021-04-28T07:36:15Z")

</div>

so this would be my “deleting-block” then…

 ![Screenshot 2021-04-28 at 09.33.53](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/1/019d3eafc2d032f5beb0cec24ceb841783c9877f.png)

…and this deletes ALL my items. And I am not surprised over that. It really feels like I need to point/connect this row id item to what item it is in the FB list??

---

<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: [April 28, 2021, 7:40am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/8 "2021-04-28T07:40:06Z")

</div>

If `Text_Input1` is empty then all the sub-keys under Items for the specifies user will be deleted. If, in the other hand, `Text_Input1` has a value then only that sub-key (mentioned in `Text_Input1` will be effected.

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 28, 2021, 7:42am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/9 "2021-04-28T07:42:27Z")

</div>

hm… yes that make sense.

so one solution could be to, every time I swipe an item the text\_input field will get the itemText and the proceed with the deleting process??

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 28, 2021, 7:51am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/10 "2021-04-28T07:51:39Z")

</div>

I have another idea, but first, theoretically, when you ad an item to your DVL there will be a “row id” output in that block:  
 ![Screenshot 2021-04-28 at 09.44.25](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/4/c4cb58710945bef19bc3242026f39e3aee14ec8a.png)

Will that be the same as the one provided when swipe a row in DVL?  
 ![Screenshot 2021-04-28 at 09.45.18](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/e/7e3b249ecb501e189fd1696d84abd84e74c67ded.png)

I mean, Are these connected to each other?

-when create an item, that Item will get row id: xxxx  
-when delete THAT item showed in a row in DVL, it will then have this row id (xxxx)??

Is that how it works?

My idea was to, every time I create an item I store that row id in a variable and then call that variable as the value in the delete-swipe function somehow…??

could this be an idea?

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 28, 2021, 9:23am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/11 "2021-04-28T09:23:22Z")

</div>

Just wanted to share, this worked for me.  
I simply add the text for that item in DVL to a variable and then put that value in the textfield. Then clear that textfield after saving is done.

 ![Screenshot 2021-04-28 at 11.21.28](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/e/fea6a079f369c663077013b55eb7b013dce64d1d.png)

---

<div class="post-metadata">

### Author: ![ukhollywood29l](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@ukhollywood29l](https://community.thunkable.com/u/ukhollywood29l)
#### Post date: [April 28, 2021, 10:26pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/12 "2021-04-28T22:26:44Z")

</div>

@andreas.sjdtomypv I’m currently trying to do the same thing as you, e.g. rebuild my app replacing Airtable with Firebase… Would you be open to sharing your sync function as I have the same problem.

Cheers!

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 29, 2021, 5:41am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/13 "2021-04-29T05:41:55Z")

</div>

Sure, no worries. Did you manage to write to FB yet?  
What are you using to show the content? ListViewer or DataListViewer?

I noticed that with the list viewer it was really easy, I just made a function that called my “Get data” from FB,  
 ![Screenshot 2021-04-29 at 07.35.05](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/e/be09db69db5c220f604d8602065528650f05f20c.png)  
then I used this block:  
 ![Screenshot 2021-04-29 at 07.33.08](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/0/d094620c33e98fafdb538b35bb8654ee88fa9d4f.png) followed by the values block with my ListViewer. Like this:

 ![Screenshot 2021-04-29 at 07.37.02](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/7/87c8d94fa8c8e9c2536849c8bf4e2a6518145108.png)  
Later on I put that block series in a variable and added that variable for my ListViewer instead. Both works.

I learned that the “get object properties of”-block always returns a list, so you just need to show it.

Hope that works for you!

/A

---

<div class="post-metadata">

### Author: ![ukhollywood29l](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@ukhollywood29l](https://community.thunkable.com/u/ukhollywood29l)
#### Post date: [April 29, 2021, 12:25pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/14 "2021-04-29T12:25:27Z")

</div>

Cheers thanks!  
Yep hooking into FB was ok, initially wanted to Firestore as it seemed more efficient but got stuck with using the API solution. So gave up and just went with the standard Realtime DB.

By the way I’m using custom DLV…  
Thanks for sharing!

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 29, 2021, 4:26pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/15 "2021-04-29T16:26:38Z")

</div>

Ok so hos has it gone for you now then? Did you got it working as you wished after all?

I am using DVL as well.

Btw, please share if you find any solution in getting the either stored to FB or viewed from FB in DVL in “insert as last”-order (instead of alphabetic as is from FB). That’s where I am stuck at the moment 🙂

---

<div class="post-metadata">

### Author: ![ukhollywood29l](https://avatars.discourse-cdn.com/v4/letter/u/ecd19e/32.png) [@ukhollywood29l](https://community.thunkable.com/u/ukhollywood29l)
#### Post date: [April 29, 2021, 5:52pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/16 "2021-04-29T17:52:41Z")

</div>

nah haven’t implemented it as yet, still messing around with structures and views etc. But I’ll keep you posted…

A possible logical solution (Although I’m finding logic and actual is sometimes very different in this platform) For the insert as last order, would be to create either a numeric field from 1 to X and filter using a list numerically or using a timestamp??

Hopefully that helps but no doubt my theory is probably completely flawed 🙂

---

<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: [April 29, 2021, 8:54pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/17 "2021-04-29T20:54:11Z")

</div>

Insert at last is a property of **Lists** and to port this to FB simply store your data in a list and save the list in the FB key. You will then retrieve it as saved with your preferred order.

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [April 30, 2021, 10:35pm UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/18 "2021-04-30T22:35:09Z")

</div>

Hi.  
I have tried different kinds of list-solutions but I don’t get how this can be done…  
Ive tried this for example where I hoped I could set the order in a list and then pas those items in that order to FB, but that didn’t solve anything for me,

 ![Screenshot 2021-04-30 at 00.39.07](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/1/b16b2a3b7b00460dd18c5889ff1dfabb1cb1e9d8.png)  
And then I tried to simply just made a list and pass that over to FB, like this:  
 ![Screenshot 2021-05-01 at 00.27.36](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/b/1b6e533faa121a9ccf716d9ea075c596c019fa0e.png)  
and that kind of works but it gives me this in FB (obviously):  
 ![Screenshot 2021-05-01 at 00.28.13](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/48ac1b93112f937503fa16c03c305d3f0bb8734f.png)

I don’t get how I can use this in FB. If I want to do anything with one of the items in FB later on, like delete or edit, I would need to separate these first and then manage these separately somehow.

Was this how you ment?

The order is fine though, so I guess I would just need to separate them on the “Open Screen”-block first, but was this how you ment?

---

<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: [May 1, 2021, 12:17am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/19 "2021-05-01T00:17:19Z")

</div>

The end of the key have a text label such as “orderedList”.

The value should have the variable for the list “myItemsList”.

---

<div class="post-metadata">

### Author: ![andreas.sjdtomypv](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@andreas.sjdtomypv](https://community.thunkable.com/u/andreas.sjdtomypv)
#### Post date: [May 1, 2021, 5:40am UTC](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404/20 "2021-05-01T05:40:54Z")

</div>

Thanks, ok so i should create a new label then, called ex ”orderedList, and attach my myItemsList to that? And then also have my myItmsList variable as the value?

Is that how you mean?

I will try this out today! Thanks!

[Next page](https://community.thunkable.com/t/find-specific-item-in-list-firebase/1248404.md?page=2)
