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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...