<?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: Where's Where's Wildcarding? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69048#M17337</link>
    <description>&lt;P&gt;That does solve it, since where just wants a boolean. I'm still curious about how I'd return something like a wildcard or other non-string value.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2012 13:21:15 GMT</pubDate>
    <dc:creator>code_monkey</dc:creator>
    <dc:date>2012-06-07T13:21:15Z</dc:date>
    <item>
      <title>Where's Where's Wildcarding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69046#M17335</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| where $click.name$ == if("$click.value$" == "Totals", * , "$click.value$")  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This bit of code is intended to allow us to use a drill-down on a table that includes a generated row where the clicked value or the clicked value's field name may not be descriptive search terms, specifically a row of column totals. Obviously, it doesn't work.  &lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Where appears to lack the wildcarding semantic entirely, which makes sense I suppose. However, I rather need that bit of functionality.&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;A bare * isn't really a valid return value here, a quoted one becomes a useless string literal, and an escaped one doesn't work either.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I was wondering if anyone had a better approach to this kind of last-minute substitution-chicanery, or if anyone knows how to get a match-any boolean expression out of a where clause?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2012 22:24:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69046#M17335</guid>
      <dc:creator>code_monkey</dc:creator>
      <dc:date>2012-06-06T22:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Where's Where's Wildcarding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69047#M17336</link>
      <description>&lt;P&gt;As far as I've understood your intention, you could probably do it this way:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | where if("$click.value$" == "Totals", true(), $click.name$ == "$click.value$")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Edit:&lt;/P&gt;

&lt;P&gt;Here's how you could use the eval command to create conditions for a search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;some search conditions&amp;gt; [ | stats count | eval search=if("$click.value$" == "Totals", "*", "$click.name$=\"$click.value$\"") | fields search ]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subsearch (within the square brackets) will expand to an additional search condition for the outer search. (The stats count part is just used to great a single result, thats rather hack/workaround)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 10:49:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69047#M17336</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-06-07T10:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Where's Where's Wildcarding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69048#M17337</link>
      <description>&lt;P&gt;That does solve it, since where just wants a boolean. I'm still curious about how I'd return something like a wildcard or other non-string value.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 13:21:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69048#M17337</guid>
      <dc:creator>code_monkey</dc:creator>
      <dc:date>2012-06-07T13:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Where's Where's Wildcarding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69049#M17338</link>
      <description>&lt;P&gt;The &lt;CODE&gt;where&lt;/CODE&gt; command doesn't "return" anything. It will simply remove those results where the expression evaluates to false. You can use the &lt;CODE&gt;eval&lt;/CODE&gt; command to create new fields.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 13:26:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69049#M17338</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-06-07T13:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Where's Where's Wildcarding?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69050#M17339</link>
      <description>&lt;P&gt;I've added an example on how you could use the eval command to create conditions for a search query.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2012 13:31:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Where-s-Where-s-Wildcarding/m-p/69050#M17339</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-06-07T13:31:18Z</dc:date>
    </item>
  </channel>
</rss>

