<?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: Using URL parameters to set input.  Conditions with match not setting tokens. in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557199#M38755</link>
    <description>&lt;P&gt;The URL is not the issue.&amp;nbsp; It's the target dashboard not determining the tokens.&amp;nbsp; I have used the exact URL that changing the dropdowns produces in the browser URL and it still doesn't work.&amp;nbsp; I know the URL works correctly because the dropdowns are changing based off of the URL, but the tokens inside the "condition" statements are not being calculated.&lt;/P&gt;</description>
    <pubDate>Fri, 25 Jun 2021 13:33:50 GMT</pubDate>
    <dc:creator>RobKelley06</dc:creator>
    <dc:date>2021-06-25T13:33:50Z</dc:date>
    <item>
      <title>Using URL parameters to set input.  Conditions with match not setting tokens.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557076#M38750</link>
      <description>&lt;P&gt;I have a link on one dashboard&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;html&amp;gt;
      &amp;lt;a href="....._dashboard?form.dcCell=$dcCell$&amp;amp;amp;form.rhel=$rhel$&amp;amp;amp;form.field1.earliest=$field1.earliest$&amp;amp;amp;form.field1.latest=$field1.latest$"&amp;gt;PRD Dashboard&amp;lt;/a&amp;gt;
       &amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;The link is filling out correctly.&amp;nbsp; When I click it and go to the target dashboard, the inputs are being set correctly, but the tokens are not being set at all.&lt;BR /&gt;&lt;BR /&gt;Target dashboard&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;
    &amp;lt;input type="dropdown" token="rhel" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;RHEL Server&amp;lt;/label&amp;gt;
      &amp;lt;choice value="rhel6"&amp;gt;RHEL 6&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="rhel8"&amp;gt;RHEL 8&amp;lt;/choice&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition match="match($rhel$,&amp;amp;quot;rhel6&amp;amp;quot;) AND match($dcCell$, &amp;amp;quot;allE&amp;amp;quot;)"&amp;gt;
          &amp;lt;set token="use_jcs"&amp;gt;True&amp;lt;/set&amp;gt;
          &amp;lt;set token="use_hikari"&amp;gt;True&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
&amp;lt;condition match="match($rhel$,&amp;amp;quot;rhel8&amp;amp;quot;) AND match($dcCell$, &amp;amp;quot;allE&amp;amp;quot;)"&amp;gt;
          &amp;lt;set token="use_hikari"&amp;gt;True&amp;lt;/set&amp;gt;
          &amp;lt;unset token="use_jcs"&amp;gt;&amp;lt;/unset&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using the drop downs, everything works fine.&amp;nbsp; It's only when i try to put the parameters in the url, does it break.&amp;nbsp; I have even tried using the drop downs and the copying the url it generates on the browser and going directly to that.&amp;nbsp; &amp;nbsp;It still does not set the tokens.&amp;nbsp; What am I missing?&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 21:03:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557076#M38750</guid>
      <dc:creator>RobKelley06</dc:creator>
      <dc:date>2021-06-24T21:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using URL parameters to set input.  Conditions with match not setting tokens.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557079#M38751</link>
      <description>&lt;P&gt;Try using token modifiers&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;html&amp;gt;
      &amp;lt;a href="....._dashboard?form.dcCell=$dcCell|n$&amp;amp;amp;form.rhel=$rhel|n$&amp;amp;amp;form.field1.earliest=$field1.earliest|n$&amp;amp;amp;form.field1.latest=$field1.latest|n$"&amp;gt;PRD Dashboard&amp;lt;/a&amp;gt;
       &amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 24 Jun 2021 21:18:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557079#M38751</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-24T21:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using URL parameters to set input.  Conditions with match not setting tokens.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557199#M38755</link>
      <description>&lt;P&gt;The URL is not the issue.&amp;nbsp; It's the target dashboard not determining the tokens.&amp;nbsp; I have used the exact URL that changing the dropdowns produces in the browser URL and it still doesn't work.&amp;nbsp; I know the URL works correctly because the dropdowns are changing based off of the URL, but the tokens inside the "condition" statements are not being calculated.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 13:33:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557199#M38755</guid>
      <dc:creator>RobKelley06</dc:creator>
      <dc:date>2021-06-25T13:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Using URL parameters to set input.  Conditions with match not setting tokens.</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557218#M38757</link>
      <description>&lt;P&gt;It looks like the change handler for the dropdown is not triggered when the dashboard loads. You could try using a hidden text input to relay the change.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Token setter&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;Inputs to set multi-select tokens&amp;lt;/description&amp;gt;
  &amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;
    &amp;lt;input type="multiselect" token="preselect" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Select&amp;lt;/label&amp;gt;
      &amp;lt;choice value="W"&amp;gt;w&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="X"&amp;gt;x&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Y"&amp;gt;y&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Z"&amp;gt;z&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;X&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition match="match($preselect$,&amp;amp;quot;[XYZ]&amp;amp;quot;)"&amp;gt;
          &amp;lt;eval token="gettoken"&amp;gt;"form.inbound=".mvjoin(split(preselect," "),"&amp;amp;amp;form.inbound=")&amp;lt;/eval&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;html&amp;gt;
    &amp;lt;a target="_blank" href="/app/answers/token_getter?$gettoken|n$"&amp;gt;Go to getter&amp;lt;/a&amp;gt;
  &amp;lt;/html&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form&amp;gt;
  &amp;lt;label&amp;gt;Token getter&amp;lt;/label&amp;gt;
  &amp;lt;description&amp;gt;Multi-select initialised on call&amp;lt;/description&amp;gt;
  &amp;lt;fieldset submitButton="false" autoRun="true"&amp;gt;
    &amp;lt;input type="multiselect" token="preselect" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Pre-select&amp;lt;/label&amp;gt;
      &amp;lt;choice value="W"&amp;gt;w&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="X"&amp;gt;x&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Y"&amp;gt;y&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="Z"&amp;gt;z&amp;lt;/choice&amp;gt;
      &amp;lt;default&amp;gt;X&amp;lt;/default&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;condition match="match($preselect$,&amp;amp;quot;[XYZ]&amp;amp;quot;)"&amp;gt;
          &amp;lt;set token="changedtoken"&amp;gt;$value$&amp;lt;/set&amp;gt;
        &amp;lt;/condition&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
    &amp;lt;html&amp;gt;
      &amp;lt;p&amp;gt;Changed token now $changedtoken$&amp;lt;/p&amp;gt;
    &amp;lt;/html&amp;gt;
    &amp;lt;input type="text" token="inbound" searchWhenChanged="true" depends="$alwayshide$"&amp;gt;
      &amp;lt;label&amp;gt;Received token&amp;lt;/label&amp;gt;
      &amp;lt;change&amp;gt;
        &amp;lt;set token="form.preselect"&amp;gt;$value$&amp;lt;/set&amp;gt;
      &amp;lt;/change&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;You might have to something a bit more fancy for multi-selects&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 16:35:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-URL-parameters-to-set-input-Conditions-with-match-not/m-p/557218#M38757</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-25T16:35:46Z</dc:date>
    </item>
  </channel>
</rss>

