I have a table Fruits. Under Fruits table I have value "apple" "grape" "kiwi"
I want to redirect the page to a new page depending on which row the user has clicked. So, if i click on "kiwi" (from the table values), I should be redirected to "abc" page, if i click on "apple" (from the table values), I should be redirected to "xyz" page. I have been trying to use the drilldown tag. but it only redirects to one single page irrespective of the value of the table clicked by user.
Try this updated answer
<panel>
<table>
<search>
<query>basequery</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>
<option name="wrap">true</option>
<option name="rowNumbers">false</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">row</option>
<option name="count">10</option>
<drilldown>
<condition match="match(`click.value2`="kiwi")">
<set token="abc">$click.value2$</set>
<link>
//pathOfNewPage?form.abc=$valueOfFieldname(eg:kiwi, apple)$
</link>
</condition>
</drilldown>
</table>
</panel>
Try this updated answer
<panel>
<table>
<search>
<query>basequery</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>
<option name="wrap">true</option>
<option name="rowNumbers">false</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">row</option>
<option name="count">10</option>
<drilldown>
<condition match="match(`click.value2`="kiwi")">
<set token="abc">$click.value2$</set>
<link>
//pathOfNewPage?form.abc=$valueOfFieldname(eg:kiwi, apple)$
</link>
</condition>
</drilldown>
</table>
</panel>
Doesnt work. 😞
Please share your dashboard code (xml)
Fruits
<input type="time" token="field1">
<label></label>
<default>
<earliest>0</earliest>
<latest></latest>
</default>
</input>
<panel>
<table>
<search>
<query>basequery</query>
<earliest>$field1.earliest$</earliest>
<latest>$field1.latest$</latest>
</search>
<option name="wrap">true</option>
<option name="rowNumbers">false</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">cell</option>
<option name="count">10</option>
<set token="abc">$click.value2$</set>
<link>
//pathOfNewPage?form.abc=$valueOfFieldname(eg:kiwi, apple)$
</link>
</drilldown>
</table>
</panel>
Try updated answer
I did. It gives me a error at this line
.. and which is why i am unable o save the xml query at all.
Extra content at the end of the document
Try this working run-anywhere sample.
<dashboard>
<label>Test Dashboard</label>
<row>
<panel>
<table>
<title>$x$</title>
<search>
<query>index=_internal | stats count by sourcetype</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<option name="drilldown">row</option>
<option name="refresh.display">preview</option>
<drilldown>
<condition match="match('click.value', "splunk")">
<link>http://www.splunk.com</link>
</condition>
<condition field="*">
<set token="x">did not match</set>
</condition>
</drilldown>
</table>
</panel>
</row>
</dashboard>
Omg!! Thank you so much
It works flawlessly
Do you want to change the path of the link based on user selection or just a value in the querystring?
want to change it Based on the value of row the user clicks on.