Dataviewers don't seem to grab from Firebase DB, how can I make my list viewer display similarly?

I would like my list viewer to show multiple bits of data instead of just showing the single item.

For instance instead of the list viewer simply saying the following…

A___________
B___________
C___________

The list should show

A has properties of 1,2 & 3______________
B has properties of 1,2 & 3______________
C has properties of 1,2 & 3______________

In my case I will always have the same qty of properties and they will also always have the same object names.
I believe a ‘for each item j’ component is required.

Thanks for any help Thunkers.

1 Like

Yes, you are right. You need to loop through your data and join the text together to get what you want. So starting with a loop to go through A,B,C,… And inside it another loop with go through your items.

But you can’t put a join component on a set list items to component

you can make custom data list viewer with cloning components unless you are using new ui

EDIT: I’ve updated the screenshot to reflect @muneer’s suggestion about emptying the list at the start

Sorry I figured out how to add the join component to lists, you just use it like this…
You have to use the ‘in list insert at last as’ component.


In my example you would replace the blue component ‘make list from text … with delimiter ,’ with whatever your actual list is.

Where j grabs each item from the current list you’re working with, then packages it all together into the ‘new list’
Then you just display ‘new list’ in your list viewer and viola.

It seems it’s also important to start the app variable off as an empty list instead of an integer, or blank text or something else.

If anyone has anything to add here I’d be happy to hear it.

Happy Thunking

1 Like

Great, you got the idea and you can adjust it to your liking. However, to avoid appending to the list every time you press the button, you need to set the list to empty
image
before going into the loop.

1 Like

Oh yes true knew I was forgetting something, otherwise it will just duplicate the list over and over.

I’ve also put this in a function so if some other event occurs it will rerun the function and update the list immediately.

I wish I knew a way to update another quick way. This isn’t viable with a large complex database tree.

Updated screenshot to reflect this.

2 Likes