How i can get tags and values in firebase and make compare?



1.I used this idea to store data in firebase
.the idea is
login student_user and inside student screen click button to get Latitude and Longitude of his bus to share his bus location
I put flag driv_stu to decide 1 for student and 2 for driver
I want to fetch driver bus no and driver latitude and Longitude which bus no for driver =Bus no for student
Get bus no for driver who his bus no = student bus no

You need an extra high level branch besides users, named buses.

On the buses branch you would add buses by number and location.

Storing bus locations under users would be onerous.

1 Like

Can you explain ?by sample

(on my phone)

Search for Firebase Data Structures, particularly something complex like chat groups.

1 Like

Is store tags and values on screenshot is correct ?
And how can after student login get his bus location

No one help me ?

It doesn't have to be complicated....

ProjectBucket set to Users

To get all data for all users:

image

This will return a json (dictionary) you can then access the data from that using dictionary and list blocks

To get data for a single user:

image

Thank you but in my screenshot I stored tags and values need to change ?

You should have the username from the login, so no need to fetch it again. If you return all the users in one call, you have all the data. Use blocks to organise the returned data.

And if you have anyway to contact direct with you ?

I mean the structure of database is correct ?
And when i login in user i get all data for this user by put project bucket as global variable
But how if i want in same screen fetch all data for other users ?

Yes - it will work
Yes - if you use the blocks I showed for a user
Use the blocks I showed for all users

We had a very nice school bus tutorial in the Firebase FAQ, but it was monetized to death.

1 Like

Can you put the exactly link

I need the idea what must after student login screen how get location of his driver and track it ?

Here's a posh tutorial on bus tracking.

Maybe it has parts you can use.

1 Like


Inked1_LI

hello everyone i have this code above store tags and values in firebase i want to know how i can get tags and values for all users

I believe you got the anwser in ..

is users a reserve word? because i didnt add anything named users

In a previous post you have Users as a top line tag:

1 Like

yes i had users
now no
like this