<?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: How to modify a dashboard input token before passing to a search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-a-dashboard-input-token-before-passing-to-a-search/m-p/659396#M227671</link>
    <description>&lt;P&gt;Use a change stanza in the input, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input type="text" token="pre_domain"&amp;gt;
...
  &amp;lt;change&amp;gt;
    &amp;lt;eval token="actual_domain"&amp;gt;replace($pre_domain$,"\\[\\.\\]",".")&amp;lt;/eval&amp;gt;  &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 03 Oct 2023 05:20:07 GMT</pubDate>
    <dc:creator>bowesmana</dc:creator>
    <dc:date>2023-10-03T05:20:07Z</dc:date>
    <item>
      <title>How to modify a dashboard input token before passing to a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-a-dashboard-input-token-before-passing-to-a-search/m-p/659336#M227664</link>
      <description>&lt;P&gt;Is it possible to modify the value of a token obtained from a dashboard input prior to it being used in a panel? In the scenario that I have&amp;nbsp;a domain value is input to have various searches executed on it. Sometimes the domain is provided to the users in a "sanitized" format to avoid clicking of links. The "." is replaced with "[.]". I want to give the users the option of inputting domains in either format, sanitized or not, and having the token value rewritten to remove the square brackets, something akin to | replace "[.]" WITH "." IN $domain$ The dashboard was created in the Classic format. I have been unable to figure out how I might modify the dashboard source to eval or modify the value into the consistent formatting. One of the things I tried was to add an &amp;lt;eval&amp;gt; tag in the source to evaluate the token into a new token value and leverage a replace command to modify it in the process but got a message stating "Invalid child="eval" is not allowed in node="dashboard"" So if an &amp;lt;eval&amp;gt; tag is the solution I am not sure where to put it. Does anyone have insight on how I might achieve this token modification cleanly?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 20:55:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-a-dashboard-input-token-before-passing-to-a-search/m-p/659336#M227664</guid>
      <dc:creator>Geep</dc:creator>
      <dc:date>2023-10-02T20:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify a dashboard input token before passing to a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-a-dashboard-input-token-before-passing-to-a-search/m-p/659396#M227671</link>
      <description>&lt;P&gt;Use a change stanza in the input, e.g.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;input type="text" token="pre_domain"&amp;gt;
...
  &amp;lt;change&amp;gt;
    &amp;lt;eval token="actual_domain"&amp;gt;replace($pre_domain$,"\\[\\.\\]",".")&amp;lt;/eval&amp;gt;  &amp;lt;/change&amp;gt;
&amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 03 Oct 2023 05:20:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-a-dashboard-input-token-before-passing-to-a-search/m-p/659396#M227671</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2023-10-03T05:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to modify a dashboard input token before passing to a search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-modify-a-dashboard-input-token-before-passing-to-a-search/m-p/659453#M227692</link>
      <description>&lt;P&gt;Thank you for this answer. It is perfect. I had a lot of the right code, I just did not know how to use the &amp;lt;change&amp;gt; tag correctly. It works exactly as I envisioned.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 14:56:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-modify-a-dashboard-input-token-before-passing-to-a-search/m-p/659453#M227692</guid>
      <dc:creator>Geep</dc:creator>
      <dc:date>2023-10-03T14:56:02Z</dc:date>
    </item>
  </channel>
</rss>

