How to select an item within a collection in firebase

How to create a “select” statement within Firebase using Kodular. for example in the People collection I want to know which ones are 1.50 tall.

I hope already you gained knowledge in firebase with previous queries and suggestions… based on that, just call the firebase in JSON format and put the tag names in a list and respective values and all in another list. Now compare the text box (contains 1.50) with the list using the block Is in the list block … if it present then get the index , with the help of index find the concern name

Sincerity I don’t know how to do this on kodular. Do you have examples here in the community?

You can always try reading the documentation and/or searching the forum.

1 Like

If you have no authentication rules you can use Web component.

Set Web1.Url to

https://<PROJECTID>.firebaseio.com/.json?

and then when Web1.GotText get responce content in json format. Afterwards you can use dictionary blocks and create lists according to your needs and filter them according to your needs

2 Likes

Guys,
I did so to save and edit. The CPF is the primary key. Enter the CPF and get the data I got. Now if I type the Neighborhood and bring what I want.

This is good to hear. :+1: , :+1:

But when the firebase got value block, I don’t think you need to use such if condition. Because in the previous step you defined , what tag must be call? Alternatively that if condition will always turned true only. Evan if you remove that if condition remaining blocks would work normally

BTW, for your above query(in this topic) pls refer this post, get idea then design your blocks as per my suggestion in the previous post.

So, when I did this same registration but using lists, I used this condition to find out if the tag is true and if the list is empty. Purpose, if the user enters his CPF incorrectly (even typing the 11 numbers - Brazil). Another detail is that to log into the app it will do as this CPF.
I’ll show you how I did in list to check if the number entered is in the list because with dictionaries I’m in doubt.
As for suggestion I will do this.

Login with CPF:

So in such case if the user mistyped mean you can alert the user in the when firebase got value itself.

I mean, when firebase got value

If get value is not equal to empty
Then use that dictionaries block
Else call notifier to alert (sorry mismatching of data

You can remove the first if block, and the rest will do the same what I feel to say…

Anyway let it go , no problem

I did it according to the post you posted.
Here’s how my data was saved in the console and how I’m looking for the information: “Neighborhood”. However, it does not bring any value.

Console:
image

You didnt catch the point it seems.

Pls try like this…

see my eg…

You can use tag if you want , if no need there you can use only value alone in when fb Got value… block

Gowri SankaR, thank you.
It worked!!!
A question what is the functionality of the ListAddon extension in this case here. I’ll give as solved.

1 Like

See my tags it is in 001, 002… But while reading time firebase, most of the time, will not give orderly… So I use listadon to order the list. Simple.

Just a question, if I wanted it to appear in this case I’m using a listviewer, for example Name, Age and Neighborhood?

Are you using any firebase authentication?

No, I’m not using

Then try this json method… Be accurate with firebase url…

Por que nesse aqui eu não consigo fazer isso? Solicitar que apareça mais de uma subtag?

If you want multiple values mean just follow the me this suggested through json type. It is very convenient to get rather than using get firebase tag list

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