Executes a pre-configured named Saved Search against the specified table and returns and array of record data for the records that match the search. This operation variant allows iteration through results page by page, also called pagination.


EWWSBaseUserObject[] os = ew.EWSearchTablePaginated(String sessionId, String
              tableName, String[] fieldNames, String searchName, int page, int limit); 


Use the EWSearchTablePaginated call to search for records in the specified table based on a Saved Search pre-configured in the GUI. Specify page and limit parameters to retrieve data page by page.

Rules and Guidelines

When querying records, consider the following rules and guidelines:

Linked Fields

Values for the fields that are imported into the target table from the donor table as a part of a Linked Fields set are available via special linking classes.

In WSDL a Linked Fields set takes form of a DAO_Dao3_Link field in the complex data structure that corresponds to the target table, where N is a sequential number assigned automatically at the time of the set creation, for example WSCase.DAO_Dao3_Link3.

As a value such fields can take one or more WS_Dao3_Link data structures - linking classes, where Table1 is the target table and Table2 is the donor table of the Linked Fields relationship, for example WSCaseTeams_Dao3_Link3.

Unfortunately, at this moment one has to rely on investigating the actual sets of fields inside the classes to trace the fields, which are visible in the Field wizard in the GUI, back to the main object property, which is not visible in the GUI.

Non-source values for Linked Field sets that allow them are present directly in the table itself and additionally to those in the Linking Classes, if the link was in fact forged.

Choice Fields

The values for choice columns are returned as instances of the enumerated types described in the WSDL.

The original text values have undergone the following transformations:

  1. Spaces replaced by "_"
  2. Dashes replaced by "MINUS"
  3. Pluses replaced by "PLUS"
  4. Prefixed with "OPTION_"
  5. Converted to Upper Case

Perform the reverse transformation to get to the text value.

Unsupported Types of Fields

Embedded search results are not supported by the SOAP interface.

Basic Steps for Searching Records with a Pre-configured Saved Search

  1. Create a Saved Search in the GUI.
  2. Perform the call using the name of the search as the "searchName" parameter.
  3. Specify page and limit values.
  4. Handle the results, specifically the situations where there are no elements, one element, or more than one element in the returned array.
  5. Iterate to the next page as required.

Example Task

In MyKB knowledgebase, as user A, find all cases assigned to the user used to login. Return the first 40 summaries as two String arrays, up to 20 elements each.

The task is completed by performing the following steps:

  1. Login to MyKB with "A" and "password" and English as the local language.
  2. Search for cases using My Assigned search.
  3. Logout.

Sample Code - Java

You can generate sample Web Services code for any table by selecting Setup > Tables > [Edit Table] > API > Download Sample.

 public String[][] search() throws Exception { 
  EWServiceAPI binding = new EWServiceAPIServiceLocator().getDemo()
  try {
    String sessionId = binding.EWLogin("MyKB", "A", "password", "en");
    String[][] result = new String[2][];
    EWWSBaseUserObject[] records1 = binding.EWSearchTablePaginated(sessionId, "case",
      new String[] {"summary"}, "My Assigned", 0, 20);
    result[0] = new String[records1.length];
    for (int i=0; i<records1.length; i++) {
      result[0][i] = records1[i].getSummary();
    EWWSBaseUserObject[] records2 = binding.EWSearchTablePaginated(sessionId, "case",
      new String[] {"summary"}, "My Assigned", 1, 20);
    result[1] = new String[records2.length];
    for (int j=0; j<records2.length; j++) {
      result[1][j] = records2[j].getSummary();
    return result;
  } finally {







Session token.



The name of the table where the query has to be performed.


String array

The list of fields to read.



The name of the Saved Search to run.



The page number.



The records per page limit, or page size.



An array of the records as descendants of EWWSBaseUserObject - a complex structure described in WSDL.


EWSessionException - client not logged in or the session has expired; client should re-login.

EWPermissionException - user used to create the session lacks the sufficient privileges to run the query.

EWWrongDataException - client has supplied the wrong data.

EWOperationException - the operation has been blocked by an function, for example a table-level lock.

EWIntegrityException - specified table cannot be found or its primary key cannot be identified.

EWUnexpectedException - an unexpected exception has occurred; the admin user should report this for investigation.

Related articles