@splunknoob_rip Can you please try this? require([
'jquery',
"underscore",
'splunkjs/mvc',
"splunkjs/mvc/searchmanager",
"splunkjs/mvc/simplexml/ready!"
], function ($, _, mvc,...
See more...
@splunknoob_rip Can you please try this? require([
'jquery',
"underscore",
'splunkjs/mvc',
"splunkjs/mvc/searchmanager",
"splunkjs/mvc/simplexml/ready!"
], function ($, _, mvc, SearchManager) {
var submittedTokens = mvc.Components.get('submitted');
console.log("Hiee 1");
// var defaultTokens = mvc.Components.get("default");
var mysearch = new SearchManager({
id: "mysearch",
autostart: "false",
search: '| makeresults | eval test = "$capturedValue$" | collect index = "test_index"',
preview: false,
}, { tokens: true, tokenNamespace: "submitted" });
$("#btn-submit").on("click", function () {
// Capture value of the Text Area
var captured = $("textarea#outcome").val();
tokens.set("capturedValue", captured);
submittedTokens.set(tokens.toJSON());
mysearch.startSearch();
});
}); I hope this will help you. Thanks KV If any of my replies help you to solve the problem Or gain knowledge, an upvote would be appreciated.