Filter & list only subcategories on Firebase DB

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?

Yes. Nothing to forgive. Nodes are just the term I use…

Do you see a method in @muneer’s example on how to accomplish what I’m asking for?
If the user selects the word “white” this would be the result.

Build --> white
Clean --> white
Drive --> white

Notice Build Clean and Drive are actually 2 levels up from the word white

What you are describing is doable. I just said that this is how I understood it and built the logic around my understanding.

You can of course iterate through the higher and check for the text you want in lower/deeper nodes.

I don’t know how to do that.

I apologize too, I’m trying, I just don’t see it yet. With everyone’s help I slowly see how to procedurally do these things.

I don’t know I’m starting to think it may not be possible in Thunkable to generate the model I’m wanting:
When a user chooses “white” the following result would occur

based on this firebase data below

image
Can this be done?

1 Like

Of course it can be done.

It is 9pm in my side of the world and today was very exhausting for me being tied up with other issues but I can do the codes tomorrow.

No worries thank you very much for your help!

1 Like

hi @overshield

This is how the screen looks like when you first open it

You can select “White” or “Wood” buttons and this is a sample result

Following is the code I used
image
3 lists for convenience.


Code when screen opens and code for each button referring to a function

This is the function

That’s it.

1 Like

This is very very close, currently the TaskType is getting the keys of the JSON and the result is:

Build: Blocks
Clean: Floors

Just like your screenshot, but I need TaskType to be grabbing the actual value so it would say

Build: wood
Clean: wood

If this is a simple fix let me know and I’ll attempt it, I’ve tried a few variations so far with no success.

Man this is very helpful though this is a lot of progress, learning a lot here.

Edit: figured out I can just add this to get it

1 Like

You can do this in a quick way. The current code has the text join comprised of two variables ThisTask and TaskType with arrow symbols between them. Just change the TaskType to FilterBy variable and you should get what you want.

Ok I apologize, on the 2nd item in the list I need to get the properties not of the filter but of the other 2 keys.

This screenshot is a better representation of data I would be using, sorry my previous screenshots were much more randomized.
In the new screenshot below I need to get the properties of “widgets” and of “color” so the result in the list should be:

Build is enabled with a color of white
Clean is enabled with a color of orange
Drive is disabled with a color of pink

Then I need to be able to tap the line item and have the ability to change enabled to disabled and also change the color.

Sorry for my mistake from the beginning

1 Like

Your explanation becomes a typical example of @drted solution in this post

JSON Bound Data List Viewer - No More Cloning!

Man I’ve looked at this since you posted yesterday, I have tried over and over to get something close and I just can’t get the result I’m so sorry. Could you post a screenshot of this?

At the bottom of the topic is a link to a project you can “remix”. Basically make a copy in you project list so you can edit to your hearts content

That’s what I tried, my heart’s pretty content at trying at this point, I’m just not seeing how to get that result. I’m so close it’s got to be just a small adjustment at this point.

Thanks again for all your help sir