.TagList error Firebase

Hey Community!
I AM HAVING A PROBLEM
THE .TagList block’s code is not working
screenshot attached
i am creating register and login page
this is part of registering to firebase

Where do you save to username/password to firebase (username as a tag) ?

@TIMAI2 I SAVE
USERNAME AS THE PROJECT BUCKET
AND PASSWORD UNDER “PASSWORD” TAG

I COULD REGISTER AND UPLOAD THESE 2 WHEN I DID NOT INSTER THE TAGLIST OPTION(WHEN THE LAST 2 (ELSE) BLOCKS WERE UNDER THE BUTTON CLICK BLOCK. BUT WHEN I ADDED THE TAGLIST OPTION TO PREVENT OVERLAPPING OF USERNAME i.e. WHEN A USER ENTERS THE SAME USERNAME WHICH WAS ENTERED BY A PERSON PREVIOUSLY, FIREBASE CHANGES THE PREVIOUS ENTRY’S PASSWORD.
SO, TO SHOW A NOTIFER SAYING THAT USER ALREADY EXISTS I DID SO.
BUT AFTER I HAD CHANGED MY CODING, IT HAS STOPPED WORKING.
I HOPE IT HELPS YOU TO UNDERSTAND MY PROBLEM.
SCREENSHOT(s) ATTACHED.
Screenshot (143)

  1. There is no need to SHOUT!! The use of BLOCK CAPITALS is not necessary, please use sentence case.
  2. To your issue…it could possibly be that the got.taglist event does NOT trigger if the taglist is empty, which would be the case when you start your app afresh, and go to enter the first user. To overcome this, you can store a true/false value in a tinydb tag - starting as false, and then setting this to true once the first user has been entered.
  3. I have put together some blocks to demonstrate this, I also have taken a slightly different approach to saving and getting values (not using “projectBuckets”)

1 Like

@TIMAI2 Thanks! It worked!!
However, after the alert is diplayed (when the user enters existing username), the password of the same username is still changing.
and what does that BUTTON2 block stand for?
pls explain that?

How ? Nothing is written to firebase if the username already exists ? (with my blocks)

I put that there to demonstrate how to get a value back from a tag (you would need another textbox, button and label for it to work

@TIMAI2 Sir,
Are the last 2 blocks(when button2.click and when firebasedb1.gotvalue) necessary for this???

Thanks for being so kind!

No, they are not required

Then
why are my blocks not working as stated in this

i have attached the screenshot so that you can see why they dont work...
thanks

Yes, some poor logic on my part! Replace your “when FirebaseDB1.TagList” blocks with this:

blocks (35)

1 Like

Thanks a lot sir!!
I am so grateful to you!!
Solution Marked :+1:t2:

Pleased I got you there in the end!

I have now reworked the logic for a better solution:

Can’t I use the previous one as it works fine and I have already built the app :sweat_smile: or this one comes in to correct a flaw?

My previous effort will only work for one, the first, device. A second device starting fresh will not work. later code blocks needed.

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