Hello everyone. I’m beginner on Kodular and I need help please. I need read all tag in Firebase table “alunos” that I don´t know how many will have for after this read the tag “data” of each than. Thank you everyone that will may help me.
well for this you need 2 or more firebase components for easy method, first one will set project bucket as alunos and get tag list, and after got tag list , for each item in list, set forebase 2 project bucket to alunos/each item/dados and get tag list and whn firebase 2 get tag list , for each item in list, call get data with tag(get item) and when got data add get value to a list and your all data will be stored in to a list and you my need to use some tricks to divide or split data from that list.
Hello my dear friend, thank you for your answer but I can
t imagine how I do this. Seeing you answer I imagine is very dificult for a begginer, even having college and seven yars in this area. Do you have some project similar that I can see? If you dont I will change the structure of my data base to facilitate. Once again I say thank you.
i will try to find or create blocks when i will be free.
You can do it with only one firebase component.
I made a similar copy of your firebase data structure.
Then I used these blocks:
In tag 1 you get the values of 1
You have to change the value of the variable numerAluno, in the example I put the value 2 and get the values of 2. If I put the value 1 so I get all the values of 1
The result is this
You get the values in a list on the label 1
Then with the list you can do whatever you want… put it in a listview or a label or whatever
I don`t have words to say thank you for you spend of your time fo help me. I believe that this way that you showed me will work but I needed know how many “alunos” and how to get all because sometimes will have: 1, 2, 4, 7…this is code of student(aluno). I will try learn the programming lenguage Kotlin for do this. Again I say thank you.
In Firebase, inside “alunos” you keep only numbers? 1,2,3,4,5,6,7,8,9… ?
Or do you also save any other data?
There’s something wrong with firebase that doesn’t allow me to get all the tags if there are only numbers inside.
If I have the structure like this, only with numbers:
It doesn’t let me get anything from inside “alunos”
But if I add a tag with any value below the numbers, then I get all the values.
So I add a “counter” tag with any value (1, for example):
When I get all the tags, if they are all numbers, the last one is the tag “counter”. So I remove the last value from the list of the tags. And there you have the values of all the alunos.
You can put all those values in a Picker and when you select 1, you get the data of that aluno.
The blocks would look something like this:
This way the values of each aluno will appear in the Spinner and when you select it you get all the data.
Only numbers that is a codigo of aluno and inside will have all of information.
Okay, then follow the instructions of what I put in the previous message. I did some tests and it works perfectly.
Nice, I will try. Thank you.
yes you are right if all tags are numbers only you will not get any data, there must be any alphabetic tag to get all.
I was going crazy wanting to get the numbers hehe
haha, same here i have spent a whole day after that and then realize this.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.