Custom firebase search

Guys, good night. I made this model based on the previous questions I asked in the community and other posts I saw.
This code there fill my listview with all the “Names” that are in my subtag Name.

The second code instead of fetching the name in the list is fetching the order it was recorded in the Database. What I want is when starting the app it doesn’t bring this list already filled and when searching it brings the name and not the position it is.

Another question, I know Firebase in a NoSql database but wanted to do a Select statement type. In my project inside firebase I have for each record (CPF) the following Subtags: Name, Neighborhood and Specialty (example: Pedreiro). Suppose I had 20 professionals in the most diverse neighborhood (may be from the same neighborhood) or different specialties (may also be from the same specialty) and I wanted to know, for example, in the neighborhood x what are the names and specialties that belong to that neighborhood or bricklayer specialty what are the names and neighborhoods. It is possible?

My database

i did not understand what you want please tell

please explain this a little more clearly

Use Use dictionary method to solve

  1. to get search name from the firebase use this,

image. also if you

to get name of the tag inwhich it is present use this,
image

Eg, this is my fb structure
image

My blocks,

If the search item matches with record, i am able to see such name in the list also the notifier says name of the tag( position) exactly…

ref here for using firebase into web
Fetching data from Firebase in Listview

So I did it the way you did but I wrote down a few things here during testing. Come on!
My code looks like this. The only thing I added was the neighborhood tag.




Now the remarks:
List view list2: When I type in the Mason specialty search field, all neighborhoods appear in the list.
List view list3: When I type in the Ipiranga neighborhood search field, all neighborhoods come up and repeated.
List view list: When I type in the Mason specialty search field, all names appear in the list

I will be objective. For example, suppose that in Bairro x I have 3 professionals with the same profession. In this case, the list view or list view text image would list the name of these professionals and their specialties. Just as for a specialty. I type for example “Bricklayer” and it would list the name of the Masons and their respective neighborhoods. This would make it easier for my client to search because I want to use geolocation afterwards.

I’m going to leave the project bucket here to make it better.
https://appavaliacao-bc413-default-rtdb.firebaseio.com/avaliacao/Profissionais.json?

My suggestion will give if it finds exact matches, now try this… I hope this will give the details that you want
Carlos_Alberto_Leonel.aia (142.2 KB)

Gowri, man, you nailed it! That’s exactly what I wanted. When you type the neighborhood appears in the name and specialty. Now in case I want to create another filter that in this case would be a specialty. In this case using logic could create a no for each number from and in to put the specialty variable? Like both neighborhood and specialty together? The objective has already been set and I can tell you that it was excellent. Let’s suppose now that when choosing a data in the list in ColinTreeListView, and that this data appears in another Screen as neighborhood name and specialty as it happens with the List View, how would it be? Thank you very much.

1 Like

I don’t know how for i understand… anyway, you can use when collintree element clicked, store the index in a variable. With this variable you can take index of the any item from any list and you can send it to next screen

I did it like that but it’s giving an error.
I put a label to receive the search result but it always comes first on the list.

I created a Screen 2 and it looked like this:

What you want to do here? Both are number, then you will get such error only .

Actually that elementindex is number.
Remove that global index variable and try

your blocks are not correct. Try this

Carlos_Alberto_Leonel(2).aia (144.7 KB)

Screen2 eg

First, sorry for the delay in replying.
I tested it and everything worked out and this model will be used for other screens that will be elaborated.
Some observations:
1 - Composite name, eg: Neighborhood: New York. When this is so, it appears divided on Screen2. As the print below. The same applies to the specialty: Building Electrician.

2 - In Colin as well as in Listview Image and Text it has an image, Title and Subtitle. Here in Subtitulo we have the Neighborhood and Specialty. I tried to add 3 more items like Mobile, Email and Professional Qualification. Cellular only appeared even so both Neighborhood and Specialty that before Colin was separated, was together with Cellular. As for the other two they didn’t show up and I wish they didn’t show up. Let them appear on Screen2.
I apologize again but I see that this post of mine has had several likes in the community thanks to your help.

image

Note: I made some changes in the bank adding Mobile, E-mail and Professional Qualification.

yes, collitree will show limited, But if you want to add few more, just try with join block
also you have to be more precise while dividing the value in next screen.

Ans you can take the image to next screen as url and display it in next screen

Regarding the image, I don’t really care what I need for the next screen is data such as Name, Mobile, Email, Neighborhood, Specialty and Professional Qualification, however, I don’t know how to do it.

if you update the firebase database it wouldbe convenient to check up your needs… since in your database only three subtag is thee for every tag

I think it’s better to assemble the code with these extra items and show the result, because I have to learn how it works and post it here.

looking like this??

Carlos_Alberto_Leonel(1).aia (146.6 KB)

On text changed block, pls add same like blocks just like main list added to collintree

I made some changes placing the image (photo). In colin’s list, both the main one and the one in the search, the photo comes to everyone and belongs only to “Carlos Alberto”. On Screen two the values ​​are now divided and sometimes not shown. Follow the .aia

Carlos_Alberto_Leonel(1).aia (146.6 KB)

the problem is your firebase structure is not wll defined. you didnt mentioned foto tag in all subtags. pls add it, if no photo available just save the tag just like you left blank for email. and i have not added the block for that but created in side. after adding foto tag ina ll, pls read all the blocks of the aia and then re arrange the blocks…

Carlos_Alberto_Le.aia (149.2 KB)

I haven’t tested it yet. As soon as I do, I will inform you, but I thank you very much for your help.