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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...