How does the Greater search field in a grid work for string attributes?

0
I have to filter on certain attributes in a data grid (regular one, not grid 2. I cannot use that one in my scenario).  One attribute is a string value (that contains numbers).  I see that it's possible to use a comparison search with the options 'Greater' or 'Smaller'. But I fail to understand how this applies to string values.  I checked the Mendix documentation, but I couldn't find a clear answer.   If anyone could enlighten me, please do :)
asked
1 answers
1

Hi Joël

 

I think the logic behind the greater and smaller than is alphabet based.

I am going to use greater than as an example, for smaller than it is the reverse.

 

  • If you enter (for example): 'b', and say greater than, it will skip all the values which start with 'a'.

It gets really interesting if you filter wider than that: 

If you would enter your name for example and say greater than:

  • If you enter Joël Boosma, it would still find your name, as 'Joël Boosman' is alphabetically greater than 'Joël Boosma'
    • If you would enter Joël Boosman, your name would not appear in the filtered list, as it is filtered out by the greater than clause
      • If you would say greater or equal, then your name would appear 

 

For your case (strings with numbers), I'm afraid this will have different behaviour compared to integers or longs, as it sees your number as a string. 

If I have a result set of the following: {1, 679, 699}, and would enter 679555 as a search criterium, only the 699 would appear as a result.

 

I hope this can serve as an answer to your question.

Good luck!

answered