Filter & list only subcategories on Firebase DB

Sorry I saw that and have since changed it to cloud but it still does not work

I changed it properly to cloud but I get nothing in my list viewer still.

Are my blocks arranged how you described here?

Use
getprops

For the cloud variable containing “username/jimbo/task”

1 Like

You don’t need the loop [for each item…].

Your list viewer should be outside the [for each item j in list]

Ok I have removed it from that but nothing has changed. Could you produce it properly and send a screenshot of the blocks perhaps?

Thank you again sir

1 Like

Sure

I’m out now but will do it later and post the blocks and the results.

I created a firebase structure similar to yours

image

I created a screen with only a list viewer and the only code is this

When I run the project, this is the result

Hope this makes it clear.

That’s it thank you very much! One last thing, in the photo, what if I wanted to only see those tasks which had a property of “wood” ?

Thanks again

1 Like

In this case you need to loop through the list and check the availability of “wood” and add it to another list.

After that just assign the newly created list to the list viewer.

Happy Thunking

I’ll be honest I’m lost there, is this a for each item j?
Or is this an in list component?

Thank you for all your help so far

1 Like

For each item j…

If you want I can do a sample tomorrow and post the code?

That would be fine or if you could walk me through it more I can attempt to get it right in the meantime?

1 Like

I have added a few things in the screen. Basically a label, a test input and another list viewer.

If you click on any of the listed item on the above list, the lower list will show the details of that item.

But if you type anything in the text field then the lower list will display only the items that contain the entered text.

If the text entered is not found in any item then you get

Is this what you are looking for?
See the blocks (not optimized but works)


Let me know if you require any explanation

You might also look at Filter JSON List of Objects - Solved - #3 by drted

2 Likes

I have this and used a variation of it in one of my apps. Many thanks for your many inputs

1 Like

So this is very close to what I was wanting, in the screenshot where you typed “wood” the result in your list3 should be

Build
Clean

so that we can see what all tasks include “wood”

This is very helpful though getting me in the right direction thank you.

Edit: Also something strange I’m finding, if I quickly press one of the items twice in the top list I get duplicates in the bottom list.

Here’s the blocks currently (I don’t need the input component, mine would all be driven by things that exist on the screen or in the list already)

1 Like

It seems I understood it differently. Anyway, you have the general idea and now you can modify it to fit your needs.

I don’t see any [if condition] in your block so you are basically listing whatever under the selected category.

Happy Thunking

Ya but that was just in case the input is ever blank but I don’t need an input.
But even in the exact example you built the “wood” issue persists.

Am I missing something to show all the different tasks that contain “wood” or “white” for example?

Like in this screenshot the result I’m wanting should be
build → wood
clean → wood

Yours displays blocks → wood instead of build
But it also shouldn’t be limited to only build, it should show any task that includes “wood”

Here’s the screenshot you included above that I’m describing

Likewise if I wanted “white” the result should be
Build → white
Clean → white
Drive → white

I hope this clarifies what I’m hoping for.

Thanks again for all your help

Or is there a way to go back up the hierarchy like this?
(this isn’t giving me the result I want it’s just for illustrative purposes to help explain what I’m wanting)

@drted I saw your post thank you for sharing, in your example, if there were multiple leaders with the name sonny would they all show up?

Thanks again guys you are all very helpful

Each node must be unique. So if there were 2 users called “jimbo”, the would both share the same node, overwriting each others data. To prevent this, you can use the firebase sign in block USERID. It is unique.

Please forgive me for my lack of knowledge, the “nodes” are these right?