Hi,
My requirement is i need to show URL (ex: https://google.com) as hyperlink on "109" value of 'SFG Request ID' column and when clicked on 109 it should take me to the URL added.
The below details are from lookup file.Similarly i need to display Different URL for on values of 'SFG Request ID' column
URL details are not present in the csv file,It is present in another lookup file.
Can anyone please suggest me how to do this?
I assume this is in a dashboard table, so see this example
<dashboard>
<label>sfg</label>
<row>
<panel>
<table>
<search>
<query>| makeresults count=10
| eval SFG=random() % 5 + 109
| eval URL="https://google.com?q=".SFG
| table _time SFG URL</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
<option name="drilldown">row</option>
<fields>_time, SFG</fields>
<drilldown>
<link target="_blank">$row.URL|n$</link>
</drilldown>
</table>
</panel>
</row>
</dashboard>
What you need to do is to lookup/generate the relevant URL for the SFG code, but hide that URL field from the display. In the above dashboard code, it does NOT show the URL field (using <fields> element).
However that field is still available to the drilldown, so you can then just use the standard <link> element with the token value from the clicked row ($row.URL|n$). Note the |n at the end, which prevents the dashboard from encoding the token, so it is treated as a URL.
I assume this is in a dashboard table, so see this example
<dashboard>
<label>sfg</label>
<row>
<panel>
<table>
<search>
<query>| makeresults count=10
| eval SFG=random() % 5 + 109
| eval URL="https://google.com?q=".SFG
| table _time SFG URL</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
<option name="drilldown">row</option>
<fields>_time, SFG</fields>
<drilldown>
<link target="_blank">$row.URL|n$</link>
</drilldown>
</table>
</panel>
</row>
</dashboard>
What you need to do is to lookup/generate the relevant URL for the SFG code, but hide that URL field from the display. In the above dashboard code, it does NOT show the URL field (using <fields> element).
However that field is still available to the drilldown, so you can then just use the standard <link> element with the token value from the clicked row ($row.URL|n$). Note the |n at the end, which prevents the dashboard from encoding the token, so it is treated as a URL.
@bowesmana Thank You,
Can you please help me only on click of 129 it should take me to External URL.
Currently drilldown is enabled on whole row so clicking on anywhere in row will take me to the external Link.
Make the drilldown "cell" and set conditions on the drilldown, like this
<dashboard>
<label>sfg</label>
<row>
<panel>
<table>
<search>
<query>| makeresults count=10
| eval SFG=random() % 5 + 109
| eval URL="https://google.com?q=".SFG
| table _time SFG URL</query>
<earliest>-24h@h</earliest>
<latest>now</latest>
<sampleRatio>1</sampleRatio>
</search>
<option name="count">100</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">none</option>
<option name="percentagesRow">false</option>
<option name="rowNumbers">false</option>
<option name="totalsRow">false</option>
<option name="wrap">true</option>
<option name="drilldown">cell</option>
<fields>_time, SFG</fields>
<drilldown>
<condition field="SFG">
<link target="_blank">$row.URL|n$</link>
</condition>
<condition field="*"/>
</drilldown>
</table>
</panel>
</row>
</dashboard>
@Azeemering Thank you for the link.
In the table i have many other such values for the column like '109,110,111,112 and so on. For each value i need to add a different URL .
I am not sure how this can be done