Hi,
I have a Simple XML dashboard and I call a JS using the script parameter. What I want to do is:
I execute 1 search, get a value and then that value I need to pass it to another search in the JS. Below are the search queries:
search1:
|makeresults | eval earliest="1497218400"|eval From=if(isint(earliest),earliest,relative_time(now(),earliest))| eval From=strftime(From,"%Y/%m/%d")
| eval latest="1497564000"|eval latest=if(latest="now","@m",latest)|eval To=if(isint(latest),latest,relative_time(now(),latest))| eval To=strftime(To,"%Y/%m/%d")| strcat From "-" To DateRange | table DateRange
Runs on the UI. I fetch the results as below:
var searchobject = splunkjs.mvc.Components.getInstance("base");
var results = searchobject.data("results");
results.on("data",function(){
var value= results.data().rows[0];
});
I have another search (this is in JS):
var mysearch2 = new SearchManager({
id: "mysearch2",
autostart: false,
search: mvc.tokenSafe("|inputlookup Approval.csv|search date=\"$value$\""),
cache: false
});
mysearch2.startSearch();
I want to pass $value$ here from the output of previous search.
Is it possible?
Thanks,
Meenal
... View more