Login Error using firebase

Hi @ABG below is the GetValue of firebase

image

If all you ask for is the pass branch of this tree, how do expect to receive the Language Selected branch?

1 Like

Could you kindly provide guidance on how I can improve it?

Herewith a simple example:

(you will need to add a web component to get the JsonTextDecodeWithDictionaries block)

1 Like

@TIMAI2 Despite my best efforts, I was unable to succeed in this matter. Enclosed, please find my file for your consideration, if you have a moment to review it.

TrashBin.aia (1.4 MB)

Please show your relevant blocks, what you have attempted...

Here is a general purpose FireBase dumper / explorer app, pre-loaded with your FireBase component.

It only goes one level deep, enough to get to your data.

It uses dictionary blocks to get parts of the user data.

I hope you will experiment with it and read and understand the code.
The YAML part is just to make the dictionary look pretty.
Sample runs:

Startup:

All blocks:


Designer:
Designer
Example of direct tag navigation:

The Project File:
FireBase_Dump.aia (6.1 KB)

Selected 1 employee:

Selected a subtag:


Top Level Tags:

For formatting output:





Events:
when  Screen1 .Initialize do



The FireBase GotValue event needs to check its tag to distinguish between a high level tag (employee name in this sample) that has an entire JSON value, and a combined tag/subtag that contains a slash (/), that has just a simple value.

After picking a subtag, I show two different ways of getting the subtag value,

  • dictionary lookup by key in the decoded JSON, or
  • another trip back to Firebase to ask for tag/subtag. The '/' is needed for when the data comes back.

1 Like

@ABG I wanted to express my sincere gratitude for the exceptional effort you put into helping me. Your contribution has given me valuable insights into block coding, which I will apply in my final semester of computer engineering and integrate into my thesis project. I am excited to study further and will report back promptly with the results. Thank you once again!

You're welcome.

One more takeaway ...

I did it because I was lazy.

It's easier to solve a general problem (people lost in their tag/value trees) once, than to re-explain the ideas on the board over and over and try to diagnose different manifestations of the same error.

Hello! @ABG After reading your guide and tips, I gained valuable insights and was able to come up with a solution to my problem.

During the trial, I encountered abnormal responses in my data, so I decided to separate them. This decision proved to be effective as I was able to resolve the issue successfully.


Although I am uncertain whether my reasoning was correct, I am pleased with the outcome since it aligns with what I intended to achieve.

Once again, thank you, @ABG , for your guidance throughout this process. Solved Cheers

Follow up
Hi
I'm currently working on retrieving the name and position of a user who has signed in. My approach involves generating a login code for the user upon successful sign-in, which is then added to their profile. My next goal is to display the user's name and position on the next screen using this code.

This is the block code image from my login page.
image

Testing retrieval code in the next screen.
image

firebase data
image

While I've successfully transmitted the login code, I'm struggling to figure out how to extract the name and position from it on the next screen.

You can avoid a lot of aggravation from multiple screens by just stacking multiple Vertical Arrangements in Screen1, only one Visible at a time.

I'm working with the suggestion of @TIMAI2. instead of 4 screens, combine them into 1 screen and switch to visible. I think this is an easy way to track the fingerprint of the user; maybe this will solve my concern. i will update soon

@ABG @TIMAI2 After the rearrangement of screens, one screen is working like a charm. Thank you so much for the idea; I'm so grateful.

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