Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Multiple filter for searchField

Hello,

We are trying to implement multiple filters for searchField as below:

     var filters = [];

     var query = this.getView().byId("searchField").getValue();

     if(query && query.length > 0)

     {

          filters = [new sap.ui.model.Filter("Firstname", sap.ui.model.FilterOperator.EQ, query),

                         new sap.ui.model.Filter("Lastname", sap.ui.model.FilterOpeator.EQ, query)];

     }

     this.getView().byId("list").getBinding("items").filter(new sap.ui.model.Filter(filters, false));

The single filter is working.

Seeking help.

Regards,

Ajay

Former Member

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question