Dashboards & Visualizations

drilldown based on token length

jiaqya
Builder

hi, could i get help on how to trigger different drilldown based on token length.

for ex: my token is 12345
so if my token length is 5 , i would like to trigger https://test12345
else
trigger the drilldown to https://test1234567890

Tags (1)
0 Karma
1 Solution

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @jiaqya,

Can you please try this drilldown?

<drilldown>
          <condition match="len('click.value')=5">
            <link target="_blank">https://test12345</link>
          </condition>
          <condition>
            <link target="_blank">https://test1234567890</link>
          </condition>
        </drilldown>

Sample Dashboard:

<dashboard>
  <label>Drilldown</label>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults | eval field1="12345,1234567890" | eval field1=split(field1,",") | mvexpand field1 | table field1</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <drilldown>
          <condition match="len('click.value')=5">
            <link target="_blank">https://test12345</link>
          </condition>
          <condition>
            <link target="_blank">https://test1234567890</link>
          </condition>
        </drilldown>
      </table>
    </panel>
  </row>
</dashboard>

View solution in original post

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

Hi @jiaqya,

Can you please try this drilldown?

<drilldown>
          <condition match="len('click.value')=5">
            <link target="_blank">https://test12345</link>
          </condition>
          <condition>
            <link target="_blank">https://test1234567890</link>
          </condition>
        </drilldown>

Sample Dashboard:

<dashboard>
  <label>Drilldown</label>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults | eval field1="12345,1234567890" | eval field1=split(field1,",") | mvexpand field1 | table field1</query>
          <earliest>-15m</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">20</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">cell</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
        <drilldown>
          <condition match="len('click.value')=5">
            <link target="_blank">https://test12345</link>
          </condition>
          <condition>
            <link target="_blank">https://test1234567890</link>
          </condition>
        </drilldown>
      </table>
    </panel>
  </row>
</dashboard>
0 Karma

jiaqya
Builder

Thanks, will try this and get back with result..

0 Karma

jiaqya
Builder

Kamlesh, that worked perfectly fine, thank you.

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@jiaqya,
Glad to help you.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Index This | What travels the world but is also stuck in place?

April 2026 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Discover New Use Cases: Unlock Greater Value from Your Existing Splunk Data

Realizing the full potential of your Splunk investment requires more than just understanding current usage; it ...

Continue Your Journey: Join Session 2 of the Data Management and Federation Bootcamp ...

As data volumes continue to grow and environments become more distributed, managing and optimizing data ...