Dashboards & Visualizations

convert dynamic drop-down to static in advanced xml

mikefoti
Communicator

In an effort to answer my own question
(posted here: http://splunk-base.splunk.com/answers/51394/convert-dynamic-drop-down-to-static)
I converted my simple form to advanced xml then attempted to replace code for the SearchSelectLister module with code for the StaticSelect module.
I replaced THIS CODE:

  <module name="SearchSelectLister" layoutPanel="viewHeader" autoRun="True">
<param name="staticFieldsToDisplay">
  <list>
    <param name="value">*</param>
    <param name="label">ALL</param>
  </list>
</param>
<param name="search">index=winradius_ow | stats count by nps_storeNumber</param>
<param name="selected">*</param>
<param name="label">Select a location</param>
<param name="settingToCreate">nps_storeNumber_setting</param>
<param name="searchFieldsToDisplay">
  <list>
    <param name="value">nps_storeNumber</param>
    <param name="label">nps_storeNumber</param>
  </list>
</param>
<param name="searchWhenChanged">False</param>
<module name="ConvertToIntention">
  <param name="settingToConvert">nps_storeNumber_setting</param>

WITH THIS CODE:

  <module name="StaticSelect">
<param name="settingToCreate">nps_storeNumber_setting</param>
<param name="label">Select a location</param>
<param name="staticFieldsToDisplay">
       <list>
            <param name="value">GMD</param>
            <param name="label">PickGMD</param>
       </list>
</param>
<param name="searchWhenChanged">False</param>


<module name="ConvertToIntention">

Any help deciphering the resulting error message would be appreciated:

Exception: Splunk cannot load the specified view because a layoutPanel is not defined for module StaticSelect_0_0_0.

0 Karma
1 Solution

Ayn
Legend

The error message really says what the problem is: you're putting a SearchSelectLister in your view, but Splunk has no idea about where to put it unless you say where you want it. I don't know enough about the details of your view so I don't know where you want the lister, but the code that you replaced had the lister defined with layoutPanel="viewHeader" so you likely want the same in the new code. So:

<module name="StaticSelect" layoutPanel="viewHeader">
...

View solution in original post

0 Karma

Ayn
Legend

The error message really says what the problem is: you're putting a SearchSelectLister in your view, but Splunk has no idea about where to put it unless you say where you want it. I don't know enough about the details of your view so I don't know where you want the lister, but the code that you replaced had the lister defined with layoutPanel="viewHeader" so you likely want the same in the new code. So:

<module name="StaticSelect" layoutPanel="viewHeader">
...
0 Karma

mikefoti
Communicator

Wow, you made that look easy! Thanks for your help... works perfectly now.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...