Range Search Field related

1
I have created DateSearch as non persistent entity having attributes start date and end date. I want to use range search field to retrieve dates between two dates. How to provide upper bound and lower bound for this??   This is my domain module and I want to retrieve dates from user entity.
asked
2 answers
3

The Range search-field is not self-explanatory. You would expect that it gives you the option to set a lowerbound and an upper bound and then find all objects having their date-attribute in the given range. But that is not it. The range requires you to give two date-attributes of the entity that will be the start and end of the range. At runtime, the user can enter one value in the searchbox and the search will return all objects having their start-attribute before the given searchdate and their end-attribute later then the given search date. See https://docs.mendix.com/refguide/range-search-field#introduction for more details.

You on the other hand want the opposite. To get that, the solution is easier then you think: Add two searchfields of type Comparison for the attribute that you want to be in the range. One you set the property ‘Comparison’ to ‘Greater or equal’, the second you set the property ‘Comparison’ to ‘Smaller or equal’. That's it.

answered
2

Retrieve where Date>= StartDate and Date <= EndDate

answered