Filtering list using Search box

Good Day,

I would like to use a search box to filter data on a dynamic list, now I know this is possible by using the “Load Table Objects” with the “where clause” being something along the lines of "name LIKE ‘% CHANGED VALUE %’, I have shown a quick example of this below.

Screenshot 2022-05-12 at 15.43.43

Now my problem is that i am trying to do the same search but instead I have already stored the Customers table in a list in “page data” during page enter. I would now like to filter the list on.

The reason why I am doing to do this is to firstly cut down on API calls and secondly this software will be used by independent companies who will have their own customers, therefore on page enter I have already filtered the customers who are related to the current user company.

Kindly advise me on the best way to filter customers (whom are linked to the current user company) using a search box.

Kind Regards
Donovan

Hello @Donovan_Hardwick!

Yes, it was the right decision to save the data from the database to PageData :+1:
Once you have saved the data from the database to PageData, you can create an input to enter the value and add similar logic to the On Change Event handler.
(In my case I’m doing a search on the email column)

Regards,
Alexander

Good Day @Alexander_Pavelko

My customers are saved to “currentCustomers” on Page Data, I am searching the “name” column. I have done the logic as show in your previous message but it seems that it is not working. I have added a screenshot below of my logic.

For example if my customers names are “Mat” and “John”, it sometimes works if I type in “J” but not if I type in “Jo”, other times it does not find the name at all, if i type in “M” it does not find “Mat”.

I think it would also be best if I add in this message that I would like to search the “name”, “email” and “contact” columns and not just the “name” column. Is this possible?

Kind Regards
Donovan

@Alexander_Pavelko

Any news?

@Alexander_Pavelko

With regards to my previous message…

“For example if my customers names are “Mat” and “John”, it sometimes works if I type in “J” but not if I type in “Jo”, other times it does not find the name at all, if i type in “M” it does not find “Mat”.”

It seems that the Search button is case sensitive and that is why the search was not working. Is there a way to remove the case sensitivity completely?

Kind Regards
Donovan

Hello @Donovan_Hardwick!

This is just one way of implementing the search, you can modify it to suit your needs.
In this case, you need to make the values and the search values look the same, for example like this:

Regards,
Alexander

Wow! Completely forgot about that text block. Thank you @Alexander_Pavelko it works.

With regards to my other question…

Any ideas on this?

Yes, you can add a key that will determine where the search will be performed. To do this, you will need to work with changedValue to separate the search query from the key. Or you can simply add a condition that the search value can be in the name, email, or contact column.

Regards,
Alexander

Thank you @Alexander_Pavelko , I thought working with conditions would be the easiest way forward so I did the following…