<?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 use * in floor in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666732#M228710</link>
    <description>&lt;P&gt;I have a field called position that contains integers and a token called position_select that is either a floating point number or a * (=all positions).&lt;/P&gt;&lt;P&gt;Now i want to search all positions that match position_select.&lt;/P&gt;&lt;P&gt;So i tried something like that:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index = index1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| eval position_search = floor($position_select$)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| where position = position_search&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The problem is that you of course can't use * in floor.&lt;/P&gt;&lt;P&gt;Another problem is that | where position = * is impossible too.&lt;/P&gt;&lt;P&gt;However i cant use | search because | search position = position_search&amp;nbsp; does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So the question is, is there any way to use something like floor()&amp;nbsp; on position_select?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 12:49:34 GMT</pubDate>
    <dc:creator>Splunkie1</dc:creator>
    <dc:date>2023-10-30T12:49:34Z</dc:date>
    <item>
      <title>use * in floor</title>
      <link>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666732#M228710</link>
      <description>&lt;P&gt;I have a field called position that contains integers and a token called position_select that is either a floating point number or a * (=all positions).&lt;/P&gt;&lt;P&gt;Now i want to search all positions that match position_select.&lt;/P&gt;&lt;P&gt;So i tried something like that:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;index = index1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| eval position_search = floor($position_select$)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;| where position = position_search&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The problem is that you of course can't use * in floor.&lt;/P&gt;&lt;P&gt;Another problem is that | where position = * is impossible too.&lt;/P&gt;&lt;P&gt;However i cant use | search because | search position = position_search&amp;nbsp; does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So the question is, is there any way to use something like floor()&amp;nbsp; on position_select?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 12:49:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666732#M228710</guid>
      <dc:creator>Splunkie1</dc:creator>
      <dc:date>2023-10-30T12:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: use * in floor</title>
      <link>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666739#M228714</link>
      <description>&lt;P&gt;Set up your selection so that the value of the selection includes the where command, except in the case of *&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    &amp;lt;input type="dropdown" token="position_select" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Floored $position_select$&amp;lt;/label&amp;gt;
      &amp;lt;choice value=""&amp;gt;*&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="| where position=1"&amp;gt;1.2&amp;lt;/choice&amp;gt;
      &amp;lt;choice value="| where position=2"&amp;gt;2.4&amp;lt;/choice&amp;gt;
    &amp;lt;/input&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Then just use the token in your search&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = index1
$position_select$&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Oct 2023 13:19:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666739#M228714</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-30T13:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: use * in floor</title>
      <link>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666747#M228720</link>
      <description>&lt;P&gt;Thank you but, I get position_select dynamically from a search with up to 1000 results.&lt;/P&gt;&lt;P&gt;working through each position individually would be impractical.&lt;/P&gt;&lt;P&gt;Is there another way?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 14:03:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666747#M228720</guid>
      <dc:creator>Splunkie1</dc:creator>
      <dc:date>2023-10-30T14:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: use * in floor</title>
      <link>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666753#M228724</link>
      <description>&lt;P&gt;Have your dynamic search return two fields, one with the float in as the label field, and the other with a string of the where command.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 14:35:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/use-in-floor/m-p/666753#M228724</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-10-30T14:35:29Z</dc:date>
    </item>
  </channel>
</rss>

