Dashboards & Visualizations

Why search is not triggered when drop-down value is changed in Django template?

pradeepkumarg
Influencer

Here is my drop-down


var nextday = new DropdownView({
id: "nextday",
labelField: "nextday",
valueField: "nextday",
selectFirstChoice: true,
value: mvc.tokenSafe("$nextday$"),
el: $("#nextdaydiv")
}).render();

        var nextDayChoices = [
            {label: "N",  value: "N" },
            {label: "Y",  value: "Y" },
        ];

And below is my query

{% searchmanager id="simplesearch" search="index=my_index sourcetype=my_sourcetype | search nextday=$nextday$" cache=False%}

When I change my drop-down value, the above search is not being triggered. What am I doing wrong here?

Tags (3)
0 Karma
1 Solution

tom_frotscher
Builder

There is a |token_safe missing after the end of your search in the searchmanager.

See here for examples: http://dev.splunk.com/view/SP-CAAAEWY

View solution in original post

tom_frotscher
Builder

There is a |token_safe missing after the end of your search in the searchmanager.

See here for examples: http://dev.splunk.com/view/SP-CAAAEWY

pradeepkumarg
Influencer

Thank you..

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...