Skip to main content
Kinetic Community

Data Viewer JS Library (RE)

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.

save image

 Features 

  • 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

Requirements

  • jQuery
  • Data Viewer's search.js file 

Optional

The library files and examples are available on the Kinetic Community GitHub.

Configuration

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 Configuration Options

Usage

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:

KDSearch.executeSearch(requestedForTableConfig);

Samples 

  • Data Viewer Sample
    • This is a full sample which includes styling, multiple Data Viewer instances, and more complex events.
  • Data Viewer - Simple Sample
    • This is simple Data Viewer sample which is intended to be quickly and easily migrated to another server.