Hi everyone. How can I make the table show when the filter is empty?
I use this logic in the filter:
So only the exact number is shown when I type the item code in the search filter. I used 'LIKE' before, but the problem is that I now have thousands of items. For example, when I searched for item code '8,' a bunch of codes containing the number 8 appeared, such as '4008,' '3811,' '2084,' and so on. I had to click the 'Next' button multiple times just to find the exact number '8.'
So instead of 'LIKE,' I used the equal sign ('='). However, the problem is that when the filter is empty, the table also shows nothing. What I want is for all data to be displayed when the filter is empty.I attached oml files
Hi,You need to modify your filter condition so that it returns all items when SearchKeyword is empty item.code = SearchKeyword or SearchKeyword = ""1.When SearchKeyword has a value, it filters based on item.code = SearchKeyword 2.When SearchKeyword is empty (""), the condition SearchKeyword = "" evaluates to True, allowing all items to be shown Thanks,sahana
Hello @Rhyz Dela Cruz ,
You can edit your condition to this:
SearchKeyword = "" or item.code = SearchKeyword
You need to check SearchKeyword is blank or not
Hi @Rhyz Dela Cruz,
I hope you are doing good.
I read your problem and know an alternative solution for your problem. You can try the below filter:
if(SearchKeyword <> nulltextidentifier(), item.code = SearchKeyword, True)
And also remember to refresh the entity after SearchKeyword is changed.
I hope this would be helpful.
Regards,
Ojasvi Sharma
You can add a condition to check whether SearchKeyword is empty or not, like below
If(SearchKeyword <> "", item.code = SearchKeyword ,True)
Hii @Rhyz Dela Cruz
Please make one local variable for item code and bind it to with dropdown. and add filter to aggregate to like
Searchkeyword = "" or item.code like "%" + SearchKeyword + "%"
typeofclothe = "" or Category.Label like "%" + typeofclothe + "%"
regards,Hiren Rathod