9
Views
4
Comments
Solved
Mobile List filter
Question
Application Type
Mobile

Hi all,

I have a screen with a list of records and an input field to filter the list and it works fine, imagine a field with the text "car  light blue ", if i search car or car light it shows up but if i type car blue it doesnt show.

In my agregate filter i have this 

LocalArtigos.design like "%" + Busca + "%"

Thanks in advance



Rank: #94
Solution

Hello David,

Hope you're doing well.

That is indeed the correct behavior for your condition, because strings "car" and "car light" are inside of "car light blue" string.

"car" -> "car light blue"

"car light" -> "car light blue"


About "car blue" string, the words in this string are inside the string if they are considered separately. But the string "car blue" itself does not match with "car light blue" string. That's why it doesn't show any records.


Basically, what your condition does is to check if your entire string is found inside LocalArtigos.design value. The comparison is done considering the entire string and not word by word.


In your scenario, it seems that you want to compare word by word, so you can do something like:

LocalArtigos.design like "%" + replace(Busca," ","%") + "%"


Hope that this helps you!


Kind regards,

Rui Barradas

Solution

The filter verifies if the field contains the all string provided between the "%"  . 

To search like you want try 

LocalArtigos.design like "%" + replace(Busca, " ","%") + "%"

Regards

Graça

Rank: #94
Solution

Hello David,

Hope you're doing well.

That is indeed the correct behavior for your condition, because strings "car" and "car light" are inside of "car light blue" string.

"car" -> "car light blue"

"car light" -> "car light blue"


About "car blue" string, the words in this string are inside the string if they are considered separately. But the string "car blue" itself does not match with "car light blue" string. That's why it doesn't show any records.


Basically, what your condition does is to check if your entire string is found inside LocalArtigos.design value. The comparison is done considering the entire string and not word by word.


In your scenario, it seems that you want to compare word by word, so you can do something like:

LocalArtigos.design like "%" + replace(Busca," ","%") + "%"


Hope that this helps you!


Kind regards,

Rui Barradas

Rank: #34191

Tanks Rui for your explanation.