I simply want to make a list viewer of the items with the arrows.
I would think there must be some simple solution.
I searched several different posts and none of them were the exact question that I have, although there were some answers that seemed promising but once I tried them they didn’t work for my list viewer.
I tried the following posts with no resolve, not exactly sure if that post would apply to my question though.
The link below shows how to get and set nested values from a firebase json tree. Basically, use a slash to separate nodes in the tree.
Thank you Thunkers!
1 Like
muneer
January 5, 2021, 9:52am
2
Use
For the cloud variable containing “username/jimbo/task”
Thanks, not sure if this is what you mean but I have put this together and I’m not populating the list with anything.
Thanks again @muneer
1 Like
muneer
January 5, 2021, 10:04am
4
What is the content of cloud variable task
?
If the cloud variable is pointing to task in Firebase then the block you showed will result in duplicates in your list viewer
Nothing, it is just an initialized cloud variable. I would assume it’s grabbing the data from the tree?
muneer
January 5, 2021, 10:11am
6
If you are showing your data in a list viewer then you don’t need the loop.
App variable
will not work. It has to be cloud variable.
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
For the cloud variable containing “username/jimbo/task”
1 Like
muneer
January 5, 2021, 10:34am
9
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
muneer
January 5, 2021, 11:38am
11
Sure
I’m out now but will do it later and post the blocks and the results.
muneer
January 5, 2021, 12:37pm
12
I created a firebase structure similar to yours
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
muneer
January 5, 2021, 4:10pm
14
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
muneer
January 5, 2021, 4:58pm
16
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
muneer
January 6, 2021, 2:27pm
18
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
drted
January 6, 2021, 4:52pm
19
2 Likes
muneer
January 6, 2021, 5:06pm
20
I have this and used a variation of it in one of my apps. Many thanks for your many inputs
1 Like