I have a list coming from db, an array of objects, i am filtering it through a variable linked to a input box, I wish it to filter things as i type, like if there are two elements such as project and documentation, and i type p in input box it should filter and only show projects on table
Use like into the aggregate in the filter as
User.name like "%"+searchvariable+"%"
And on the change screen action try to refresh the same entity
Hope this helps if not please try to attach the screen shots
Thanks
Prince
The list is already stored in a variable, please tell me how to filter it from there
here is OML take help from it i have applied the filter into the user's name with the input applying on key press action.
@Shivang Shukla check the OML
Hey, thanks for the time taken to create the oml, but as i said the data is already stored in a variable, and i want that filtered only.
Hi Shivang,
You can also use the index function in ListFilter action on change of your input for your use case like this.
Hope it helps,
This method isnt working for me, even simple filter isnt working
Is it possible for you to share some screen shots of your structure or logic that you are trying to filter, it will be easy to help you.
I wish to apply a filter on this list, as i type in the input above, the list should filter out, what to do?
the list is a list of a structure that i defined for the sql to store the data structure on.
I am also storing the values into client variable to make them readily available if one come to this page again, via JSon serializing it first.
Use this condition in your listfilter in the onChange of your input.If it doesn't work please share your OML
Why is it a requirement to filter the local list instead of the database?
Your approach can yield serious performance problems.
You query more data from the database than you need, making the query to the database slower. It will also consume more memory on your front-end-server as it needs to keep more data in the list than you require. Depending on the number of data you store in the list, this could even lead to an unresponsive application.
From a performance best practice, you only query the data you require, and as such apply the filter on your aggregate or advanced SQL statement.
Furthermore, filtering on an aggregate or an advanced SQL gives you more options on how to filter than filtering a list stored in a local variable.
Regards,
Daniel