I ask again. if you are not calling the language data back from firebase, how can you select and display it ?
Sorry, I didn't get you clearly; however, my understanding is that you are asking me the call function, which I provide as per the marks in the images. If this is not what you mean, please kindly elaborate.
Let me try again
What are you calling in your Firebase getValue block, and what is the raw response ?
I'm getting "not found" Response from May Firebase
Show us the FireBase GetValue block that you use to request the user language.
If all you ask for is the pass branch of this tree, how do expect to receive the Language Selected branch?
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)
@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:
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:
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.
@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.
Testing retrieval code in the next screen.
firebase data
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.