Get specific tag value if all other details match firebase?

I am using Firebase Database in test mode. (not using authentication )


I am trying to find specific value (password) of specific tag (username)

I am asking user to fill few details (first name, last name, email, mobile, username) if that all details matches with Firebase it should Show specific value (password) to that user.

Now i am having trouble here, If username is correct but all other details (first name, last name, email, mobile) are incorrect (wrong) it is displaying specific value (password) that it should not display specific value (password) if all other details (first name, last name, email, mobile) are incorrect (wrong) it should not display value (password).

please help me with block how to set them correctly

Very simple. Use if conditions, how many match you want use that much if blocks. One firebase alone is enough.
In 1st if block use, if the tag value of user name = user name text box (user input) mean use another if block(use it in then condition) get tage value of second one = user input box like wise set up. And in 1st if block *else condition use the notifier text - sorry user name is not matching… Likewise continue the setup.

In the last if block (then condition) make visible what you want to show to the user…

Do Understand anything???

can you please help me with blocks i am not understanding also take a look at block image that i posted

you can use dictionary

Your Code is ready

I am not master in firebase but this question seems to be easy but upon constructing it gives lot of headaches. Later i realized my mistakes…

Screenshot_3

Here by i am attaching one by one Blocks as image file, download and use as it is… But dont forget to add, API key and firebase url… Leave the Project bucket empty…

Here is the final and simple code,

If it solves, Dont forget to hit Solution… It will useful to others also…

1 Like

Now this is working fine, if any single entry is wrong this is not showing password only real user can receive password by filling all correct details.

1 Like

So you are Happy Now… Great… Keep coding

1 Like

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