The Table view


The Table view displays a table of search results.


Library path

Simple XML wrapper



Default value


id Required. The unique ID for this control.
data"preview"The type of data to retrieve from the search results
results | preview | events | summary | timeline ).
dataOverlayMode"none"The type of overlay to display
heatmap | highlow | none ).
displayRowNumbersfalseIndicates whether to display row numbers.
drilldown"row"The type of drilldown action
row | cell | none ).
drilldownRedirecttrueIndicates whether to redirect to a search page when clicked. When true, a refined search corresponding to the point that was clicked is displayed in the search app. When false, you must create a click event handler to define a drilldown action. You can also use the preventDefault method in the click event handler to bypass the default redirect to search.
fieldsnullThe fields to display in the table. When using Django tags, specify a comma-separated string. In JavaScript, specify a comma-separated string or an array of strings.
formatnullThe properties for a sparkline, in the format:
format: {
    "sparkline_fieldname": [
            "type": "sparkline",

            // Sparkline options
                "property-1": "value-1",
                "property-n": "value-n"
where sparkline_fieldname and type are required. For more, see How to customize table cells and format sparklines.
manageridnullThe ID of the search manager to bind this view to.
pagerPosition"bottom"The position on the page where the page is displayed ( top | bottom ).
pageSize10The number of results per page.
previewResultstrueIndicates whether to display preview results.
showPagertrueIndicates whether to display the table pagination control.
wrapfalseIndicates whether to wrap text in the results table.




table.addCellRenderer(renderer)Adds a cell renderer to the table, where renderer is an instance of your custom cell renderer.
table.getCellRenderersGets an array of the cell renderers that have been added to the table.
table.removeCellRenderer(renderer)Removes a cell renderer from the table, where renderer is an instance of your custom cell renderer.
renderDraws the view to the screen. Called only when you create the view manually in JavaScript.




click:cellFired when a cell is clicked.
click:rowFired when a row is clicked.

Example (Django tag)

{% table id="example-table" managerid="example-search" pageSize="5" %}

Example (JavaScript)

    var deps = [
    require(deps, function(mvc) {
        var TableView = require("splunkjs/mvc/tableview");

        // Instantiate components
        new TableView({
            id: "example-table",
            managerid: "example-search",
            pageSize: "5",
            el: $("#mytableview")


Code examples