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!

Streamline Data Ingestion With Deployment Server Essentials

REGISTER NOW!Every day the list of sources Admins are responsible for gets bigger and bigger, often making the ...

Remediate Threats Faster and Simplify Investigations With Splunk Enterprise Security ...

REGISTER NOW!Join us for a Tech Talk around our latest release of Splunk Enterprise Security 7.2! We’ll walk ...

Introduction to Splunk AI

WATCH NOWHow are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. ...