<?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: Inputlookup, Return command &amp;lt;$Field&amp;gt; and &amp;lt;Field&amp;gt; confusion with Dashboard Implementation in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646237#M223698</link>
    <description>&lt;P&gt;I honestly have never encountered use of &amp;lt;$field&amp;gt; in SPL because SPL generally uses bare string for field name, and &amp;lt;$token$&amp;gt; for token name. &amp;nbsp;If return is not the only command that uses this syntax, it must be among an extreme few. &amp;nbsp;And as you just experience, using &amp;lt;$field&amp;gt; notation does more harm than good.&lt;/P&gt;&lt;P&gt;So, why does the following give you "waiting for input?"&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;index=whatever sourcetype=whateverXxX&lt;BR /&gt;[ | inputlookup FileName.csv |$Type_of_deployment$ | return host=$IIS_Server ] OR&lt;BR /&gt;([| inputlookup FileName.csv |$Type_of_deployment$ | return host=$IIS_for_XServers cs_uri_stem=$Pattern_for_Servers])&lt;BR /&gt;| timechart span=$Span_Timechart$ count by host&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you are a compiler and scan the command, you'll see the following potential tokens in need of population:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;$Type_of_deployment$&lt;/LI&gt;&lt;LI&gt;$IIS_Server ] OR&lt;BR /&gt;([| inputlookup FileName.csv |$&lt;/LI&gt;&lt;LI&gt;$IIS_for_XServers cs_uri_stem=$&lt;/LI&gt;&lt;LI&gt;$Span_Timechart$&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You may have&amp;nbsp;$Type_of_deployment$ and&amp;nbsp;$Span_Timechart$ defined in your dashboard input, but I am sure not the others. &amp;nbsp;Hence "waiting for input."&lt;/P&gt;&lt;P&gt;You can report this as a Simple XML bug. &amp;nbsp;There may be some strategies for the scanner to tokenize $IIS_Server within that subsearch as an alternative format for return command. &amp;nbsp;But in practice, it is easier to just forget that return command has an alternative format for field name, and stick to using bare word.&amp;nbsp; The documentation clearly says that there is no semantic difference.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Jun 2023 05:01:06 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-06-08T05:01:06Z</dc:date>
    <item>
      <title>Inputlookup, Return command &lt;$Field&gt; and &lt;Field&gt; confusion with Dashboard Implementation?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646225#M223693</link>
      <description>&lt;P&gt;Hey All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I'm relatively new to Splunk. I have a csv file that has multiple computers and I've created a dashboard trying to get reports based on the parameters the user chooses. The search by itself is fine and is this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=whatever sourcetype=whateverXxX
[ | inputlookup FileName.csv | search Type="Prod" | return host=IIS_Server ] OR
([| inputlookup FileName.csv | search Type="Prod" | return host=IIS_for_XServers cs_uri_stem=Pattern_for_Servers])
| timechart span=5m count by host&lt;/LI-CODE&gt;
&lt;P&gt;but when I start placing&amp;nbsp; that search in a dashboard with user inputs it looks like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=whatever sourcetype=whateverXxX
[ | inputlookup FileName.csv |$Type_of_deployment$ | return host=$IIS_Server ] OR
([| inputlookup FileName.csv |$Type_of_deployment$ | return host=$IIS_for_XServers cs_uri_stem=$Pattern_for_Servers])
| timechart span=$Span_Timechart$ count by host&lt;/LI-CODE&gt;
&lt;P&gt;Once implemented I get a "Search is wating for input..." even after selecting an input and clicking the submit button.&lt;/P&gt;
&lt;P&gt;But I found the solution for the dashboard is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=whatever sourcetype=whateverXxX
[ | inputlookup FileName.csv | $Type_of_deployment$ | return host=IIS_Server ] OR
([| inputlookup FileName.csv | $Type_of_deployment$ | return host=IIS_for_XServers cs_uri_stem=Pattern_for_Servers])
| timechart span=$Span_Timechart$ count by host&lt;/LI-CODE&gt;
&lt;P&gt;So if you noticed the difference it's the &amp;lt;$field&amp;gt; with the return command. I don't understand the difference between&amp;nbsp; &amp;lt;$field&amp;gt; and &amp;lt;field&amp;gt;.&lt;BR /&gt;I've searched everywhere and the documentation on it still confuses me, even posts from this community forum. Why does it matter when it comes into the dashboard?&lt;BR /&gt;But when I use either format ( &amp;lt;$field&amp;gt; and &amp;lt;field&amp;gt;) for normal searching it doesn't have a problem and actually spits back the exact same results between the two. Which according to the documentation and from research that's not even supposed to happen. But it throws a fit when I place it into the dashboard. Can someone ELI5?&lt;/P&gt;
&lt;P&gt;Some Sources that I've used and don't make much sense to me:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-use-INPUTLOOKUP-command-in-splunk/m-p/92212" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-use-INPUTLOOKUP-command-in-splunk/m-p/92212&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/9.0.2303/SearchReference/Return" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/SplunkCloud/9.0.2303/SearchReference/Return&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 13:35:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646225#M223693</guid>
      <dc:creator>SubtotalAMG</dc:creator>
      <dc:date>2023-06-09T13:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup, Return command &lt;$Field&gt; and &lt;Field&gt; confusion with Dashboard Implementation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646235#M223697</link>
      <description>&lt;P&gt;Tokens (I presume Type_of_deployment is a token set by some input on your dashboard) are delimited by dollar signs and the search will wait for the input for the token to be completed. The search is probably waiting for a token called "IIS_for_XServers cs_uri_stem=" (which doesn't exist) - try doubling up the dollars for the variables&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=whatever sourcetype=whateverXxX
[ | inputlookup FileName.csv |$Type_of_deployment$ | return host=$$IIS_Server ] OR
([| inputlookup FileName.csv |$Type_of_deployment$ | return host=$$IIS_for_XServers cs_uri_stem=$$Pattern_for_Servers])
| timechart span=$Span_Timechart$ count by host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 04:40:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646235#M223697</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-06-08T04:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup, Return command &lt;$Field&gt; and &lt;Field&gt; confusion with Dashboard Implementation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646237#M223698</link>
      <description>&lt;P&gt;I honestly have never encountered use of &amp;lt;$field&amp;gt; in SPL because SPL generally uses bare string for field name, and &amp;lt;$token$&amp;gt; for token name. &amp;nbsp;If return is not the only command that uses this syntax, it must be among an extreme few. &amp;nbsp;And as you just experience, using &amp;lt;$field&amp;gt; notation does more harm than good.&lt;/P&gt;&lt;P&gt;So, why does the following give you "waiting for input?"&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;index=whatever sourcetype=whateverXxX&lt;BR /&gt;[ | inputlookup FileName.csv |$Type_of_deployment$ | return host=$IIS_Server ] OR&lt;BR /&gt;([| inputlookup FileName.csv |$Type_of_deployment$ | return host=$IIS_for_XServers cs_uri_stem=$Pattern_for_Servers])&lt;BR /&gt;| timechart span=$Span_Timechart$ count by host&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you are a compiler and scan the command, you'll see the following potential tokens in need of population:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;$Type_of_deployment$&lt;/LI&gt;&lt;LI&gt;$IIS_Server ] OR&lt;BR /&gt;([| inputlookup FileName.csv |$&lt;/LI&gt;&lt;LI&gt;$IIS_for_XServers cs_uri_stem=$&lt;/LI&gt;&lt;LI&gt;$Span_Timechart$&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;You may have&amp;nbsp;$Type_of_deployment$ and&amp;nbsp;$Span_Timechart$ defined in your dashboard input, but I am sure not the others. &amp;nbsp;Hence "waiting for input."&lt;/P&gt;&lt;P&gt;You can report this as a Simple XML bug. &amp;nbsp;There may be some strategies for the scanner to tokenize $IIS_Server within that subsearch as an alternative format for return command. &amp;nbsp;But in practice, it is easier to just forget that return command has an alternative format for field name, and stick to using bare word.&amp;nbsp; The documentation clearly says that there is no semantic difference.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 05:01:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646237#M223698</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-06-08T05:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup, Return command &lt;$Field&gt; and &lt;Field&gt; confusion with Dashboard Implementation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646385#M223737</link>
      <description>&lt;P&gt;You're alternative solution worked thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 22:56:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646385#M223737</guid>
      <dc:creator>SubtotalAMG</dc:creator>
      <dc:date>2023-06-08T22:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Inputlookup, Return command &lt;$Field&gt; and &lt;Field&gt; confusion with Dashboard Implementation</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646386#M223738</link>
      <description>&lt;P&gt;Compiler view helped me understand the problem and the alternative solution worked as well thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 22:57:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Inputlookup-Return-command-lt-Field-gt-and-lt-Field-gt-confusion/m-p/646386#M223738</guid>
      <dc:creator>SubtotalAMG</dc:creator>
      <dc:date>2023-06-08T22:57:07Z</dc:date>
    </item>
  </channel>
</rss>

