Skip to main content
Splunk Cloud Platform

Splunk Dashboard Studio

Splunk Cloud Platform™
9.3.2411 (latest release)

Dynamic options syntax selector functions

Dynamic options syntax (DOS) is the programming syntax used in Dashboard Studio for visualization options and dynamic menu options for inputs. You can use selector functions in DOS to specify which aspects of your data you want to reference for your visualization options configurations. See Dynamic options in Dashboard Studio to learn more about dynamic options.

Dynamic options syntax structure

DOS structure has several parts, each separated by a pipe ( | ).

DOS Part What it does Required?
Data Source An originating data source, which can be a visualization data source such as a primary data source or visualization options such as sparklineValues. The location of your data sources, searches, and options for each search you create in the visual editor. Yes
Selector functions Identifies the data from the data source associated with the visualization. A dynamic option can have one or multiple selector functions. No
Formatting function Formats the selected data. Optional unless additional data formatting is needed.

A typical DOS structure looks like the following:

Option: "> [data source] | [selector functions] | [formatting function]"

Table visualization with dynamic coloring example

The example syntax and results for each of the described selectors will reference this table example that uses the dynamic options syntax (DOS) to color values within columns. The following image is an example of a table used to display the names of games, number of purchases for each game, and total revenue from each game.

A table called Most Purchased Games with three columns. The first column is called Games and contains different game names in shades of green, yellow, and red. The second column is called Purchases and contains numerical values between 2,000 and 3,700. The third and last column is called Revenue and contains dollar amounts demonstrating how much revenue each game made.

Source code example

The following is a source code example of a table visualization using DOS to dynamically color the table's columns. Notice the different selector functions such as seriesByName(\"Revenue\") and seriesByIndex(0).

Expand

Select Expand to see the full source code example.

DataFrame selectors

A DataFrame is a two dimensional dataset, similar to a search result with multiple columns, where each column is a field in your DataFrame. You can use the DataFrame selector getField() to return the name of every column in the search result.

getField()

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector getField():

getType()

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector getType():

max()

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector max():

min()

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector min():

frameBySeriesIndexes(<index1>, <index2>...)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector frameBySeriesIndexes(<index1>, <index2>...):

frameBySeriesIndexRange(<start>, <end>)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector frameBySeriesIndexRange(<start>, <end>):

frameBySeriesNames(...names)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector frameBySeriesNames(...names):

frameBySeriesNamesOrIndexes(...namesOrIndexes)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector frameBySeriesNamesOrIndexes(...namesOrIndexes):

frameBySeriesTypes(...types)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector frameBySeriesTypes(...types):

frameWithoutSeriesNames(...names)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector frameWithoutSeriesNames(...names):

getRawValue()

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector getRawValue():

getValue()

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector getValue():

seriesByIndex(index)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector seriesByIndex(index):

seriesByName(field)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector seriesByName(field):

seriesByPrioritizedTypes(...types)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector seriesByPrioritizedTypes(...types):

seriesByType(type)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector seriesByType(type):

seriesByTypes(...types)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector seriesByTypes(...types):

setValue(v)

Expand

Select Expand to see a description, an example, and an example result for the DataFrame selector setValue(v):

DataSeries selectors

A DataSeries is a one dimensional dataset, such as a search result with a single column. That single column is the only field of the one dimensional dataset. You can use the DataSeries selector getField() to return the name of the single column in the search result.

getField()

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector getField():

getType()

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector getType():

max()

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector max():

min()

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector min():

delta(index)

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector delta(index):

firstPoint()

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector firstPoint():

lastPoint()

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector lastPoint():

pointByIndex(index)

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector pointByIndex(index):

pointsByIndexes(...indexes)

Expand

Select Expand to see a description, an example, and an example result for the DataSeries selector pointsByIndexes(...indexes):

DataPoint selectors

A DataPoint is a single value within a dataset, such as a cell within a table chart.

getField()

Expand

Select Expand to see a description, an example, and an example result for the DataPoint selector getField():

getType()

Expand

Select Expand to see a description, an example, and an example result for the DataPoint selector getType():

getValue()

Expand

Select Expand to see a description, an example, and an example result for the DataPoint selector getType():

getRawValue()

Expand

Select Expand to see a description, an example, and an example result for the DataPoint selector getType():

setValue()

Expand

Select Expand to see a description, an example, and an example result for the DataPoint selector getType():

Last modified on 12 December, 2023
Visualization configuration options   Dynamic options syntax formatting functions

This documentation applies to the following versions of Splunk Cloud Platform: 9.3.2411, 9.0.2305, 9.1.2308, 9.1.2312, 9.2.2403, 9.2.2406, 9.3.2408 (latest FedRAMP release)


Please expect delayed responses to documentation feedback while the team migrates content to a new system. We value your input and thank you for your patience as we work to provide you with an improved content experience!

Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters