How do I retrieve only users name from firebase to load them in list in another screen?

When user chooses one of the options, a chat list appears for him
The problem is that I don't want these sections as variables. I want to bring them back from firebase
But the problem is that I do not know to return it because I store the data in another screen and I do not know
1- How to retrive a particular field from firebase?
How did he relate it to list veiw ?

if any one understant the problem can answer .


Please show your firebase data structure, and identify the "field" you would like to return

You need to call back a taglist from "projectBucket" Doctor/doctors, assuming that the tag "elham ali" is always the same as the first item in the list "\"elham ali\", then you have a list of names to work with.

If you actually need the data that you have circled (because it will be different from the tag) I believe the only way will be to call back ALL the data in tag doctors as a list of lists, then work with this list of lists in the app to extract the first item of the sub list from the identified list in the list of lists (ugh!!)

1 Like

[quote="TIMAI2, post:4, topic:29299"]
call back ALL the data in tag doctors as a list of lists, then work with this list of lists in the app to extract the first item of the sub list from the identified list in the list of lists
[/quote] how to code it

image

You could do it like this, in two steps:

image

or like this:


(you need to have a web component for the JSONTextDecode block, and a variable for the key name (ali)

I tried the first way, but it didn't help ,it shows only user name in tags
So I wanted to show specializationas field too , so I put it in the tags so that it appears because I tried to show it by changing index , but it did not help

Not really sure where your problem is:

image
(note: I have edited the first items in each list to make it obvious what is being returned)

ok it work the problem in my code
but I have question the names that in Firebase iI will not know what names the user registers, so I cannot compare it using text
is there any way to compare key
i want show list of all user name and anther field ?

In which case you will have to fetch all the names using the taglist method.

??

Let us understand something, in your firebase data:

does elham ali === \"elham ali\" or can these two entries, the tag name, and the first item in the list, be different?

no there are the same
image

In which case you can use this method:

image

In order to call back the list of names under the projectBucket "Doctor/doctors"
then select a name from that list to return the full data for that name, and select items from that list.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.