Filter a column on multiple values

Hi Guys,

I understand that we can filter table to display the rows that matches certain filter text with value in a column. But is it possible to display the rows of a table that matches ‘filter text A’ or ‘filter text B’ at one go?

That is, I would like to display the rows that has the column value as ‘filter text A’ or ‘filter text B’. Can you please advise if it is possible to bind the filter criteria like this?

Kind regards,
Raj

Below is what that tag documentation for the Input Filter control states for table filtering:

If a table control is bound to com.webMethods.caf.faces.data.IFilterableTableContentProvider, and the provider’s isFilterable() method returns a value of true, the filtering is done on the server, by the provider, using the provider’s filter property value to filter the rows over which the provider can iterate.

With the default IFilterableTableContentProvider implementations (com.webMethods.caf.faces.data.object.FilterableListTableContentProvider and com.webMethods.caf.faces.data.object.FilterableSelectableListTableContentProvider), you must initialize the provider with a binding expression to use to calculate the value to filter on for each row. For example, you might use a filter value binding of #{row.title} #{row.description} to filter on the title and description fields of each row.

If a table control is not bound to an IFilterableTableContentProvider that is filterable, then filtering is done on the client, over the entire textual content of the row, using the standard common search keyword rules such as * = wildcard, space = and, quotes = exact phrase.

Hi,

if I understood Raja right he wants to filter one column for containing one of two possible values (‘A’ or ‘B’).

This means, that all rows should be displayed for which the column contains either ‘A’ or ‘B’.
All rows which are not having ‘A’ or ‘B’ but something else in this column should not be displayed.

Is this possible?

Regards,
Holger

Not really, both the default client-side and server-side filter logic uses the standard common search keyword rules such as * = wildcard, space = and, quotes = exact phrase.

So the default filter implementation would not recognize any syntax that would express an “or” operator for two filter terms.

If there are areas that you would like to be improved in documentation or functionality, then you can make a proposal in brainstorm @ [url]https://empower.softwareag.com/Products/FeatureRequestsInBrainstorm/default.asp[/url] for consideration in a future release.

Hi Holger,

Thanks for that. You got me right :).

Many thanks Eric for the confirmation. Since the out-of-the-box feature is not there for this kind of usecase, I will write custom functionality to filter the data (in server side action handler).

Kind regards,
Raj