<?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: Sankey diagram drilldown to set form tokens? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-have-Sankey-diagram-drilldown-to-set-form-tokens/m-p/569882#M46815</link>
    <description>&lt;P&gt;Did you find a way to do this? I'm looking for it as well. $click.value$ and $click.value2$ don't seem to work with Sankey diagrams. When I try to set them using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;drilldown&amp;gt;
          &amp;lt;set token="show_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="local"&amp;gt;$click.value$&amp;lt;/set&amp;gt;
          &amp;lt;set token="test2"&amp;gt;$click.value2$&amp;lt;/set&amp;gt;
&amp;lt;/drilldown&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;It seems upon click, I see an action taking place but the variables are just displayed as $click.value$, i.e, they don't take any value from the Sankey diagram.&lt;/P&gt;&lt;P&gt;If i find something that works, I'll post back here for the next poor soul.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Oct 2021 13:21:31 GMT</pubDate>
    <dc:creator>izyknows</dc:creator>
    <dc:date>2021-10-06T13:21:31Z</dc:date>
    <item>
      <title>How to have Sankey diagram drilldown to set form tokens?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-have-Sankey-diagram-drilldown-to-set-form-tokens/m-p/530942#M36095</link>
      <description>&lt;P&gt;I am using Splunk 8.1.0 with the Sankey Diagram 1.5.0 app.&lt;/P&gt;
&lt;P&gt;I have a sankey diagram viz in a dashboard. The source and target fields of the sankey correspond to&amp;nbsp; dashboard form inputs that I use to filter queries.&lt;/P&gt;
&lt;P&gt;When the dashboard user clicks on the left side of the sankey diagram (a source field value), I want to set the corresponding form input to that value.&lt;/P&gt;
&lt;P&gt;Similarly, when the user clicks on the right side of the sankey diagram (a target field value), I want to set the corresponding form input to that value.&lt;/P&gt;
&lt;P&gt;How do I do that?&lt;/P&gt;
&lt;P&gt;I've tried:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;drilldown&amp;gt;
  &amp;lt;condition field="source"&amp;gt;
    &amp;lt;set token="form.applid"&amp;gt;$click.name2$&amp;lt;/set&amp;gt;
    &amp;lt;set token="applid"&amp;gt;APPLID="$click.name2$"&amp;lt;/set&amp;gt;
  &amp;lt;/condition&amp;gt;
  &amp;lt;condition field="target"&amp;gt;
    &amp;lt;set token="form.poolid"&amp;gt;$click.name2$&amp;lt;/set&amp;gt;
    &amp;lt;set token="applid"&amp;gt;"ENQ Pool ID"="$click.name2$"&amp;lt;/set&amp;gt;
  &amp;lt;/condition&amp;gt;
&amp;lt;/drilldown&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(where "applid" and "poolid" are the tokens set by the form inputs, and also the corresponding form input id attribute values)&lt;/P&gt;
&lt;P&gt;but that navigates to a new tab with a new search that has the "set" values appended:&lt;/P&gt;
&lt;P&gt;... APPLID=TXCQAIC "ENQ Pool ID"=EXECSTRN&lt;/P&gt;
&lt;P&gt;I don't want to navigate to a new window. I want to remain on the same dashboard, and just update the form inputs and their corresponding tokens.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 20:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-have-Sankey-diagram-drilldown-to-set-form-tokens/m-p/530942#M36095</guid>
      <dc:creator>Graham_Hanningt</dc:creator>
      <dc:date>2023-08-22T20:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Sankey diagram drilldown to set form tokens?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-have-Sankey-diagram-drilldown-to-set-form-tokens/m-p/569882#M46815</link>
      <description>&lt;P&gt;Did you find a way to do this? I'm looking for it as well. $click.value$ and $click.value2$ don't seem to work with Sankey diagrams. When I try to set them using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;drilldown&amp;gt;
          &amp;lt;set token="show_panel"&amp;gt;true&amp;lt;/set&amp;gt;
          &amp;lt;set token="local"&amp;gt;$click.value$&amp;lt;/set&amp;gt;
          &amp;lt;set token="test2"&amp;gt;$click.value2$&amp;lt;/set&amp;gt;
&amp;lt;/drilldown&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;It seems upon click, I see an action taking place but the variables are just displayed as $click.value$, i.e, they don't take any value from the Sankey diagram.&lt;/P&gt;&lt;P&gt;If i find something that works, I'll post back here for the next poor soul.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 13:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-have-Sankey-diagram-drilldown-to-set-form-tokens/m-p/569882#M46815</guid>
      <dc:creator>izyknows</dc:creator>
      <dc:date>2021-10-06T13:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sankey diagram drilldown to set form tokens?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-have-Sankey-diagram-drilldown-to-set-form-tokens/m-p/655087#M53866</link>
      <description>&lt;P&gt;Late to this discussion, but posting the answer here for any folks who search this up later.&lt;/P&gt;&lt;P&gt;After some testing, I found that the Sankey drilldown tokens use the &lt;STRONG&gt;&lt;EM&gt;$row.Field Name$&lt;/EM&gt;&lt;/STRONG&gt; format:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;      &amp;lt;viz type="sankey_diagram_app.sankey_diagram"&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;... | stats sum(bytes) as total_bytes count by source target&amp;lt;/query&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;all&amp;lt;/option&amp;gt;
        &amp;lt;drilldown&amp;gt;
          &amp;lt;set token="form.source_tok"&amp;gt;$row.source$&amp;lt;/set&amp;gt;
          &amp;lt;set token="form.target_tok"&amp;gt;$row.target$&amp;lt;/set&amp;gt;
        &amp;lt;/drilldown&amp;gt;
      &amp;lt;/viz&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't believe there's a way to distinguish between a click on the source versus the target, so field conditions don't seem to work like they would for a table.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 21:10:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-have-Sankey-diagram-drilldown-to-set-form-tokens/m-p/655087#M53866</guid>
      <dc:creator>duncan_</dc:creator>
      <dc:date>2023-08-21T21:10:59Z</dc:date>
    </item>
  </channel>
</rss>

