Skip to Content

Search on multiple columns

Hi experts,

First of all I have a table with two columns: one shows firstName and the other one shows the ID.

This is the code of my worklist controller.

if (oEvent.getParameters().refreshButtonPressed) { this.onRefresh(); } else { var oTableSearchState = []; var sQuery = oEvent.getParameter("query");

if (sQuery && sQuery.length > 0) { oTableSearchState = [new Filter("firstName", FilterOperator.Contains, sQuery)]; } this._applySearch(oTableSearchState); }}

As yo can see if I am able to find employees by its firstName. So my question is. What code I need If I want to search by the ID too? I mean, I would like to have the posibility to search by the firstName or by the ID.

Thanks in advance.

Marcos.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 08, 2016 at 03:29 AM

    Hi Marcos,

    Will this sample help? JS Bin - Collaborative JavaScript Debugging

    Regards,

    Sai.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.