47
Views
6
Comments
Solved
How can I make the table show when the filter is empty?
Application Type
Reactive


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

for demo data.oml
for demo.oml
2026-02-16 05-51-10
Sahana K
Solution

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


2026-01-28 16-57-48
Mihai Melencu
Champion

Hello @Rhyz Dela Cruz ,

You can edit your condition to this:

SearchKeyword = "" or item.code = SearchKeyword

2022-12-30 07-28-09
Navneet Garg

You need to check SearchKeyword is blank or not 

UserImage.jpg
Ojasvi Sharma

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

2026-02-16 05-51-10
Sahana K
Solution

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


UserImage.jpg
Gireesh Kumar  P

You can add a condition to check whether SearchKeyword is empty or not, like below

If(SearchKeyword <> "", item.code = SearchKeyword ,True)

2023-05-31 07-26-04
Hiren Rathod

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

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.