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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...