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.
Use the EWSearchTable call to search for records in the specified table based on a Saved Search pre-configured in the GUI.
Rules and Guidelines
When querying records, consider the following rules and guidelines:
- The username that was used to obtain the specified session token must have sufficient access rights to read individual records within the specified table. Please verify specific permissions via Setup > Access > Manage Groups > (Edit Group) > Table > (Select Table) > Permissions.
- Agiloft allows specifying fine-grained access permissions on the field level. The username that was used to obtain the specified session token must have sufficient access rights to be able to read field content. Please verify specific permissions via Setup > Access > Manage Groups > (Edit Group) > Table > (Edit Table) > Field Permissions.
- This call does not return records that have been deleted.
- This method never returns null. In the case when no records are found an empty array is returned.
- Special note on memory management: As WS integration implies pass-by-value semantics, the memory allocated for the resulting array will be released once the data is sent to the client and server-side JVM's garbage collector considers it eligible for discarding.
- If the client-side environment is the one with a garbage collector, the memory used by client-side array will be cleared once the client-side garbage collector considers it eligible.
- When the client environment uses explicit memory management, the client is responsible for freeing up the used memory explicitly.
- When using the EWSearchTable method, only the fields explicitly listed in the call are read. Within the values returned for the fields requested explicitly, a null value, where nillable="true", means the actual null value was retrieved. However, the rest of the fields – those not listed in the fieldNames array – will also appear on the wire as nillable="true" elements due to limitations of the underlying Web Services stack.
- To read all fields, use "*" string constant as the only element in the fieldNames array.
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<N> 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 (e.g. WSCase.DAO_Dao3_Link3).
As a value such fields can take one or more WS<Table1><Table2>_Dao3_Link<N> 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.
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:
- Spaces replaced by "_"
- Dashes replaced by "MINUS"
- Pluses replaced by "PLUS"
- Prefixed with "OPTION_"
- Converted to Upper Case
One has to perform the reverse transformation to get to the text value.
Unsupported Types of Fields
Related tables and embedded search results are not supported by the SOAP interface.
Basic Steps for Searching Records with a Pre-configured Saved Search
- Create a Saved Search in the GUI.
- Perform the call using the name of the search as the last parameter.
- Handle the results, specifically the situations where there are no elements, one element, or more than one element in the returned array.
In MyKB knowledgebase, as user A, find all cases assigned to the user used to login. Return summaries as a String array.
The task is completed by performing the following steps:
- Login to MyKB with "A" and "password" and English as the local language.
- Search for cases using My Assigned search.
Sample Code - Java
You can generate sample Web Services code for any table by selecting Setup > Tables > (Edit Table) > API > Download Sample.
The name of the table where the query has to be performed.
The list of fields to read.
The name of the Saved Search to run.
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 Agiloft 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.