Data Viewer provides a simple and consistent way to add search functionality to a Service Item. It performs a search using a Bridge Request or Simple Data Request and displays the results in a list or table. It provides a low or no code way to add a search and commonly used features to a Kinetic Request Service Item.
- Easy to implement
- Consistent, reusable configuration driven.
- Executes a search using a Bridge or Simple Data Request without the need for extensive or custom code.
- Display search results in a consistent format (Data Table and Unordered Lists included.)
- Callbacks are available to enable the execution of custom code at various points in the process.
- before - runs before the search is performed.
- success - runs after the search was successful.
- success_empty - runs after the search was successful but there are no results.
- error - runs if the search returned an error.
- complete - runs after the search was performed and results are displayed.
- clickCallback - runs after results in the Data Table or List are selected by the user.
- Search results can be set into questions from single, list or Data Table results.
- Commonly used behaviors and functionality included in core functionality
- Data Viewer's search.js file
Data Viewer requires a collection of properties and values in provided to it in a JSON Object. This object defines the search to be executed, the events to be performed at various stages, how the results will be displayed and other behavior.
Data Viewer is executed by passing a Configuration Object to the KDSearch.executeSearch function. Using the Configuration Object above as an example, the search is performed by executing: