Fetching the value of a tag using Firebase Realtime Database

I am trying to get a value from a specific tag provided by the firebase postText using WebComponents. I will show some of my progress


This image is my realtimeDb and the Yellow Highlighted pen is the values that I wanted to get in order to display them to my listviewer elements.

image
Image here is the procedure that gets the values.

image
Image here is the method when the firebase .GotText the result from the procedure.

It doesnt work, it does not display the values to my list viewer.
This time, im seriously stuck in this problem and started to giving me a sore eyes.
(note: I've done searching this problem to the community that similar to this but it doesnt exist)

For debugging purposes, create a couple of global variables:

  • debug_tag
  • debug_value

At the top of your FireBaseDB.GotValue event, add a couple of assignments to fill those global variables from the temporary tag and value variables.

Add a couple of debug Labels too, so you can assign the global tag and value into Label.Texts for debugging.

Show what arrived, tag and value, using Do It or a screenshot of the runtime Labels.

1 Like

try like this

If you set tag like this (dictionary mode) , then do not use get tag.. It wont wont work. Alsways gey key value from get value. Even if you set, it will return what did you set as tag in previous step(GetValue block) it will return the same, I mean it will return (get tag =
image
)

1 Like

I would recommend NOT to mix using the web component and the Firebase component, tht is asking for trouble. It may work but can cause confusion...

1 Like

This will be my last resort, use web component to fetch. I have also a little problem to this since everytime my app changes its page...The response changes and the worst is losing all those global variables :sweat_smile: . I found a way though by copying the .json to a dictionary global variable so that the values stays within the app.

There you are.. while saving the value you might have used firebase project so it worked. Show me what did you set the fb project

The error is due to firebase project

It returns this kind of error


I dont know now what to do with this kind of err.

Yeah I know this is due to not obtaining the required json. Show me your fb project that is used for saving hairstylist

my bad that I have deleted the last msg.

Or show me the your blocks used for firebase save value in hairstylist


Image here is storing the values.

Is this what you looking for?

Then how that I'd is generated for every hairstylist..


Because I used .PostText instead of .PutText.
This is auto-generated by the firebase web component.

I've used .PostText since I want those hairstylist to be stored multiple times even if they have the same names. Using .PutText will just replace those tag with new values which is a pain since I cannot store multiple times.

Do you have any suggestion methods in doing this?

I will test and will let you know further

1 Like

Much appreciated.

Make sure this place is empty. I have tested it as I suggested in the above manner and found working good.

1 Like

All good, its working. Thanks a lot. Might try to modify it in order to make it realtime after the button is pressed. :100: :exploding_head: :clap:

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