How to limit number of occurrences to one in list view

0
Hi all,   I'm new to Mendix, so sorry if this is something absolutely basic. I have a page set up that displays multiple orders next to each other by a template grid (inside a list view) this data is fed through a microflow that contains an expression.   Whenever only 1 order is matched, it just shows that order. But whenever we don’t enter any search id (i.e. when the entire list is fetched) it shows the same list again and again. This means For each row of the list view same template grid with the same details is getting repeated. Is it possible to limit the number of occurrences to one?   Image 1— This shows arrangement of widgets to show result on page    Image2---- This is image microflow which is used to get filtered/ searched data  
asked
2 answers
0

Hi Aishwarya,

In the exclusive split where you are checking if the search string is empty kindly change it as explained below

  • Check if the search string is not empty, if its true retreive the records from database using the search string.
  • If its false, you can do your normal flow

Hope it helps!!!

answered
0

I think you are looking for list operations: https://docs.mendix.com/refguide/list-operation/

Here you can filter your list based on your search criteria.
And for checking empty strings you better use a rule: https://docs.mendix.com/refguide/rules/
The community commons isempty or isnotempty can be used as a rule. Because a string with noting in it( so two single quotes) is different from empty. So an empty check you do now does not work in all cases. Use the rule instead.
 

Regards,

Ronald

 

answered