Setting a Queue Number for each User

Hi guys,
i am working on our capstone project, its a queueing system where students will registered and log in. After that, they will be able to get a queue number. I am not knowledgeable in C# nor C++ languages. I will attach my file here for you to see my work. I would be glad to be corrected if there is some corrections or simplifications to my work.

This is my firebaseDB where those parent nodes came from importing a Json file. Also, you will not be able to register if you are not one of those account (parent node).

after registering, childkey in each parent node will get its value.

Here is my Login screen.

Registration Screen

Screen4(home) where student will get their queue and where I get stuck.
QueueTrial.aia (3.1 MB)
I would like to ask, if there is a way when press the Get queue # button, the app will set a queue number for each user? if it is, I am pleased to learn it from you.

Do you mean, that A20205, A20206 is the queue number? Can you tell us more here What is the meaning of queue number here?

A20202 to A20210 is the mock account for each student. I used it for verification if the user is a legitimate student of our school .. The QueueNumber as you can see doesn't have a value. When you registered then logged in, you will be take to screen4(Home). When you pressed the "Get Queue #" button, the QueueNumber node will get its value but I am confused what blocks should I used to be able to do that.

In registration page you left empty string in that particular tag value. It is ok

In screen4 you are calling all the tags of stored user data (using user data procedure) that is also ok (same manner you can call the queue number too but it was empty string ) ,

Here my question is, you are not calling all the data of registered student in admin app it seems only those number present in tinydb only you are calling (so not calling all the tags under students list) then how you will set the queue number? If you have called all the users then you can set queu er ( I feel it is a ascending order number only you mean)

Firebase can provide an increment code, which you can apply to a tag value.

You could update the increment, get the value, and then add this to the student's queue tag.

You can reset the increment server value by getting the current value, then setting to the negative equivalent (or just set to 0 or 1)