I am trying to pass two values from one form to another.
Here is my query :
...| timechart span=1h count by country_code
I want to pass the time value and the individual country code to the drill down dashboard. The time value gets passed but not the country code value. Here is my drill down link
<link>
<![CDATA[/app/Timeout_Reports/time_details?form.country_code=$country_code$&form._earliest=$e$&form._latest=$le$]]>
<option name="dataOverlayMode">none</option>
</link>
On the drilldown dashboard I have a input fieldset for the country code.
<input type="dropdown" token="country_code" searchWhenChanged="true">
<label>Country Code</label>
<search>
<query>... | eval country_code=substr(server_name,1,2) | where country_code=$country_code$ |stats count by country_code </query>
</search>
<fieldForLabel>country_code</fieldForLabel>
<fieldForValue>country_code</fieldForValue>
</input>
I am then passing it to the search query in the drilldown dashboard.
... | eval country_code=substr(server_name,1,2)| where country_code=$country_code$ | table _time, server_name, country_code, desc, type
The time value is passed but not the country code. Not sure what is wrong
You can use $row.country_code$, $row.server_name$, etc. See the example below from: http://docs.splunk.com/Documentation/Splunk/6.4.2/Viz/Understandbasictableandchartdrilldownactions#D...
Just make sure to include the <option name="drilldown">row</option>
<dashboard>
<label>Dynamic Drilldown</label>
<row>
<panel>
<table>
<search>
<query>index="_internal" | chart count by sourcetype | sort sourcetype</query>
<earliest>-7d@h</earliest>
<latest>now</latest>
</search>
<drilldown>
<link target="_blank">
/apps/MyApp/drilldown_dynamic_target_form?form.src_type_tok=$row.sourcetype$
</link>
</drilldown>
<option name="drilldown">row</option>
</table>
</panel>
</row>
</dashboard>
You can use $row.country_code$, $row.server_name$, etc. See the example below from: http://docs.splunk.com/Documentation/Splunk/6.4.2/Viz/Understandbasictableandchartdrilldownactions#D...
Just make sure to include the <option name="drilldown">row</option>
<dashboard>
<label>Dynamic Drilldown</label>
<row>
<panel>
<table>
<search>
<query>index="_internal" | chart count by sourcetype | sort sourcetype</query>
<earliest>-7d@h</earliest>
<latest>now</latest>
</search>
<drilldown>
<link target="_blank">
/apps/MyApp/drilldown_dynamic_target_form?form.src_type_tok=$row.sourcetype$
</link>
</drilldown>
<option name="drilldown">row</option>
</table>
</panel>
</row>
</dashboard>
I had row already in my code. But the document helped. It worked. Thanks