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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...