<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to pass a value from the search in one tab for use in another tab using Simple XML? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132220#M7813</link>
    <description>&lt;P&gt;Here also you are defining ticketnumber  token in both the xml page.&lt;BR /&gt;
Can we do like define a token for sourcetype in page1.xml  like  provide a text area to user for provide the sourcetype and then use same sourcetype provided by the user, in page2.xml.&lt;/P&gt;

&lt;P&gt;No need to provide sourcetype again in page2.xml&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jun 2015 15:46:05 GMT</pubDate>
    <dc:creator>ektasiwani</dc:creator>
    <dc:date>2015-06-02T15:46:05Z</dc:date>
    <item>
      <title>How to pass a value from the search in one tab for use in another tab using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132214#M7807</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;My requirement is like this:&lt;/P&gt;

&lt;P&gt;I have an application with two tabs. I want to run a splunk search in one tab and use the result in other tab.&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;P&gt;In the first search, i want to run a search to get list of students with their marks.&lt;BR /&gt;
And in other tab i want to use the topper name to congrats him/her.&lt;BR /&gt;
I don't want to run that search again in the second tab.&lt;BR /&gt;
My dashboard is in xml.&lt;BR /&gt;
Can this be achieved by using tokens? if yes can anyone tell me how?&lt;BR /&gt;
I know how to pass token from one panel to other in same tab, but not able to pass it from one tab to other.&lt;/P&gt;

&lt;P&gt;Can anyone help me with that?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 06:56:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132214#M7807</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-06-01T06:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a value from the search in one tab for use in another tab using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132215#M7808</link>
      <description>&lt;P&gt;hi, &lt;BR /&gt;
please post your code xml and let me check how to do?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 09:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132215#M7808</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2015-06-01T09:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a value from the search in one tab for use in another tab using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132216#M7809</link>
      <description>&lt;P&gt;Here tabs means page.&lt;BR /&gt;
lets imagine i have two xml page.&lt;BR /&gt;
page1.xml and page2.xml&lt;BR /&gt;
i want to run the search query in page1.xml or want to define token in page1.xml&lt;BR /&gt;
 and want to use that token in page 2.xml.&lt;/P&gt;

&lt;P&gt;Is it possible?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 10:40:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132216#M7809</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-06-01T10:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a value from the search in one tab for use in another tab using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132217#M7810</link>
      <description>&lt;P&gt;try following this link:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/170633/how-do-i-use-one-search-to-populate-a-bunch-of-pan.html"&gt;http://answers.splunk.com/answers/170633/how-do-i-use-one-search-to-populate-a-bunch-of-pan.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 10:58:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132217#M7810</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2015-06-01T10:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a value from the search in one tab for use in another tab using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132218#M7811</link>
      <description>&lt;P&gt;Here its showing how to save search and use it in different panel but same dashboard.&lt;BR /&gt;
I want to use it in different dashboard. &lt;BR /&gt;
And in simple xml if possible.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jun 2015 16:28:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132218#M7811</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-06-01T16:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a value from the search in one tab for use in another tab using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132219#M7812</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;
I propose to use a drilldown will get the value in the first table to return in the second table and trigger the results of this second table. Here is an example of code I used to do this recently drilldown.&lt;/P&gt;

&lt;P&gt;First step: You created the first table (page1.xml) and the inside of the code you use a tag that drilldown will recover the value of a field that you wish to return in the second table that you must first create .&lt;/P&gt;

&lt;P&gt;Second step: creating the second table (page2.xml) with its display will be conditioned by the value of the first table field.&lt;/P&gt;

&lt;P&gt;and try and let me know if that helps you.&lt;/P&gt;

&lt;P&gt;page1.xml&lt;BR /&gt;
    &lt;/P&gt;&lt;FORM&gt;&lt;BR /&gt;
      &lt;LABEL&gt;Tickets List&lt;/LABEL&gt;&lt;BR /&gt;
      &lt;DESCRIPTION&gt;this dashboard list all tickets, and let you update a ticket&lt;/DESCRIPTION&gt;&lt;P&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;fieldset autoRun="true" submitButton="false"&amp;gt;

    &amp;lt;input type="time" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select a time&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;0&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;

    &amp;lt;input type="dropdown" token="TicketNumber" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select the TicketNumber&amp;lt;/label&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=ticket report="ticket1" |stats first(TicketNumber) by TicketNumber&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;TicketNumber&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;TicketNumber&amp;lt;/fieldForValue&amp;gt;
      &amp;lt;prefix&amp;gt;TicketNumber="&amp;lt;/prefix&amp;gt;
      &amp;lt;suffix&amp;gt;"&amp;lt;/suffix&amp;gt;
    &amp;lt;/input&amp;gt;

    &amp;lt;input type="multiselect" token="host" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Host&amp;lt;/label&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;host="&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
      &amp;lt;delimiter&amp;gt;OR &amp;lt;/delimiter&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=ticket report="ticket1" |stats count by host&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;host&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;host&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;/input&amp;gt;

    &amp;lt;input type="multiselect" token="status" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Status&amp;lt;/label&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;status="&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=ticket report="ticket1" $TicketNumber$ |stats first(status) as status by TicketNumber |stats count by status&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;status&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;status&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;/input&amp;gt;

    &amp;lt;input type="multiselect" token="comment" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Comments&amp;lt;/label&amp;gt;
      &amp;lt;prefix&amp;gt;(&amp;lt;/prefix&amp;gt;
      &amp;lt;valuePrefix&amp;gt;Comments="&amp;lt;/valuePrefix&amp;gt;
      &amp;lt;valueSuffix&amp;gt;"&amp;lt;/valueSuffix&amp;gt;
      &amp;lt;delimiter&amp;gt; OR &amp;lt;/delimiter&amp;gt;
      &amp;lt;choice value="*"&amp;gt;All&amp;lt;/choice&amp;gt;
      &amp;lt;suffix&amp;gt;)&amp;lt;/suffix&amp;gt;
      &amp;lt;search&amp;gt;
        &amp;lt;query&amp;gt;index=ticket report="ticket1" $TicketNumber$ |stats first(Comments) as Comments by TicketNumber |stats count by Comments&amp;lt;/query&amp;gt;
      &amp;lt;/search&amp;gt;
      &amp;lt;default&amp;gt;*&amp;lt;/default&amp;gt;
      &amp;lt;fieldForLabel&amp;gt;Comments&amp;lt;/fieldForLabel&amp;gt;
      &amp;lt;fieldForValue&amp;gt;Comments&amp;lt;/fieldForValue&amp;gt;
    &amp;lt;/input&amp;gt;

  &amp;lt;/fieldset&amp;gt;


  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table id="master"&amp;gt;
        &amp;lt;title&amp;gt;Tickets for $host$, $status$, generated by Error_alert, triggered&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;index=ticket report="ticket1" $host$ $TicketNumber$ $status$ $comment$ |dedup TicketNumber
             |table TicketNumber Alerttime status Comments Raw 
          &amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;

        &amp;lt;drilldown&amp;gt;
          &amp;lt;!-- Use set to specify the new token to be created.
            Use any token from the page or from the click event to produce the value needed. --&amp;gt;  
          &amp;lt;link&amp;gt;/app/CPU/tickets_list2?form.TicketNumber=$row.TicketNumber$&amp;lt;/link&amp;gt;
        &amp;lt;/drilldown&amp;gt;
        &amp;lt;option name="count"&amp;gt;10&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;page2.xml&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Tickets List&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;this dashboard list all tickets, and let you update a ticket&amp;lt;/description&amp;gt;
 &amp;lt;row&amp;gt;
  &amp;lt;panel&amp;gt;
    &amp;lt;title&amp;gt;Update: $TicketNumber$ generate by Error_alert, triggered&amp;lt;/title&amp;gt;

      &amp;lt;input type="text" token="TicketNumber" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Enter a TicketNumber:&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
      &amp;lt;/input&amp;gt;

      &amp;lt;input type="text" token="comment2" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;Update the comment&amp;lt;/label&amp;gt;
      &amp;lt;/input&amp;gt;

      &amp;lt;input type="dropdown" token="newstatus" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;Change the ticket status&amp;lt;/label&amp;gt; 
        &amp;lt;choice value="Open"&amp;gt;Open&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="Closed"&amp;gt;Closed&amp;lt;/choice&amp;gt;
        &amp;lt;choice value="In progress"&amp;gt;In progress&amp;lt;/choice&amp;gt;
        &amp;lt;default&amp;gt;&amp;lt;/default&amp;gt;
        &amp;lt;change&amp;gt;
          &amp;lt;condition value="Open"&amp;gt;
            &amp;lt;set token="new_search"&amp;gt;index=ticket report="ticket1" $ticketNumber2$  
              |eval status1="Open"
              |eval hist_status=if( status1 != status,"status change from: " +  status + " to :" +  status1,"status no change")
              |eval hist_comment=if(Comments != "$comment2$","old comment is :" + Comments + " new comment is :" + "$comment2$" , "comments no change")  
              |eval status_set_time=strftime(_time,"%Y-%m-%d %H%M%S")
              |eval status_change=if(status1 != status,"yes","no")
              |eval status=status1
              |eval Comments="$comment2$" |head 1
              |table TicketNumber  Alerttime status Comments status_set_time hist_status hist_comment status_change Raw
              |collect index=ticket marker="report=\"ticket1\""&amp;lt;/set&amp;gt;
          &amp;lt;/condition&amp;gt;

          &amp;lt;condition value="Closed"&amp;gt;
            &amp;lt;set token="new_search"&amp;gt;index=ticket report="ticket1" $ticketNumber2$ 
              |eval status1="Closed"
              |eval hist_status=if( status1 != status,"status change from: " +  status + " to :" +  status1,"status no change")
              |eval hist_comment=if(Comments != "$comment2$","old comment is :" + Comments + " new comment is :" + "$comment2$" , "comments no change") 
              |eval status_set_time=strftime(_time,"%Y-%m-%d %H%M%S")
              |eval status_change=if( status1 != status,"yes","no")
              |eval status=status1
              |eval Comments="$comment2$"
              |eval NewTicketNumber=round(_time) |head 1
              |table TicketNumber  Alerttime status Comments status_set_time hist_status hist_comment status_change Raw
              |collect index=ticket marker="report=\"ticket1\""
            &amp;lt;/set&amp;gt;
          &amp;lt;/condition&amp;gt;

          &amp;lt;condition value="In progress"&amp;gt;
            &amp;lt;set token="new_search"&amp;gt;index=ticket report="ticket1" $ticketNumber2$
              |eval status1="In progress"
              |eval hist_status=if( status1 != status,"status change from: " +  status + " to :" +  status1,"status no change")
              |eval hist_comment=if(Comments != "$comment2$","old comment is :" + Comments + " new comment is :" + "$comment2$" , "comments no change")
              |eval status_set_time=strftime(_time,"%Y-%m-%d %H%M%S")
              |eval status_change=if(status1 != status,"yes","no")
              |eval status=status1
              |eval Comments="$comment2$" |head 1
              |table TicketNumber  Alerttime status Comments status_set_time hist_status hist_comment status_change Raw
              |collect index=ticket marker="report=\"ticket1\""
            &amp;lt;/set&amp;gt;
          &amp;lt;/condition&amp;gt;
        &amp;lt;/change&amp;gt;
      &amp;lt;/input&amp;gt;

      &amp;lt;table&amp;gt;
        &amp;lt;title&amp;gt;Table&amp;lt;/title&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;$new_search$&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;row&amp;lt;/option&amp;gt;
        &amp;lt;option name="count"&amp;gt;5&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;

&amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/FORM&gt;</description>
      <pubDate>Tue, 02 Jun 2015 07:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132219#M7812</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2015-06-02T07:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a value from the search in one tab for use in another tab using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132220#M7813</link>
      <description>&lt;P&gt;Here also you are defining ticketnumber  token in both the xml page.&lt;BR /&gt;
Can we do like define a token for sourcetype in page1.xml  like  provide a text area to user for provide the sourcetype and then use same sourcetype provided by the user, in page2.xml.&lt;/P&gt;

&lt;P&gt;No need to provide sourcetype again in page2.xml&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jun 2015 15:46:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132220#M7813</guid>
      <dc:creator>ektasiwani</dc:creator>
      <dc:date>2015-06-02T15:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass a value from the search in one tab for use in another tab using Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132221#M7814</link>
      <description>&lt;P&gt;hi,&lt;BR /&gt;
yes, you can get the sourcetype of page1.xml in page2.xml, just use a text box to enter the sourcetype in page1.xml and condition the drilldown on the value of this sourcetype and it will appear in page2.xml carefree. in my code I have conditioned the drilldown with the value of ticketNumber, you only need to edit, and rather sourcetype.&lt;/P&gt;

&lt;P&gt;let me know if this will work as desired.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jun 2015 08:21:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-pass-a-value-from-the-search-in-one-tab-for-use-in/m-p/132221#M7814</guid>
      <dc:creator>gyslainlatsa</dc:creator>
      <dc:date>2015-06-03T08:21:17Z</dc:date>
    </item>
  </channel>
</rss>

