Search filtering

I have this database on FB

I need to obtain the names that belong to the ZONAL 1 text

This means that in a dropdown I must get:
these belong to item 1


I have these blocks to obtain per item but it is not the same


Hi again.

Create a new list. Compare the third element of each item with "ZONAL 1" and, if it matches, then insert the first element of the same item in the new list.

This would be the idea:

no matter how much I try it doesn't work


Does it have to go with quotes?

Show in a label the value of this so you can see which values are comparing, why they are no equal and try to fix it:

this comes out


Try this:

thank you

And if I wanted to reverse the search

after selecting from the dropdown
I would like to obtain ZONAL 1
I mean item 3

I don't have filtered the elemts into the spinner by zonal1 so, all the elements in spinner are zonal 1...what do you want to do? Which data do you have now in the spinner?

This block is to obtain all the ITEMS 1 in a dropdown that is, the names

and after selecting I need it to show me which ZONAL 1 belongs to

It has nothing to do with the above

I'm just trying to reverse the search.

Ok, then it would be something like this:

1 Like

Perfect, thanks

one last question

If you would like to get your label?

For example, if I select GUILIANO I would like to obtain 1000


well, that is not have to go through the entire list of tags and check element by element which one contains the string you are looking for, and stay with that tag. If only one tag can contains one name, you can stop searching once you have found it. Something like this:

1 Like

does not come out

I would like to get it after selecting the dropdown

this is my blocks

If you see what I shared before, that part you are marking was in a very specific block "GotValue" which received the data from a specific tag.

As you can see, first it was calling to GetTagList to get all the tags, then, for each tag it is calling to GetValue and finally, in GotValue block is receiving the data of each tag.
In that block is where you are receiving the data from your tag and is where you can compare...but you need to get the data associated to the tags first.

Or if you already have a list with the data recovered from firebase you can search directly in it.

he left

I had to remove the symbol to be able to get only the label

or is there another way to get just the label without a symbol?

I have this problem

I am adding an empty one to the dropdown list and sorting it

What happens is that after selecting it gives me another ZONAL

Of course, because you have "misplaced" the list...

Before that change, you had two paired lists: names and zones so, if you chose element 1 from the list of names, from its index, you could obtain the element of its pair from the list of zones, but once you have sorted one of the lists this no longer works.

Solution, you can order both lists equally, or you search in the original list where you had everything together (name, number, area, route) which element contains the selected name.

The extra empty element in the spinner is not a problem, because you always can subtract one to the index,

This is the idea: