<?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 change a input text field to upper case and search for the changed value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203429#M176261</link>
    <description>&lt;P&gt;Like @someson2 said, the base search is case-insensitive by default. However, it looks like you are using the wrong token. &lt;/P&gt;

&lt;P&gt;The input field you pasted uses the token name "OrderNumber" and not "OrderID" (see &lt;CODE&gt;token="OrderNumber"&lt;/CODE&gt;). If that is the case, your search should be the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;myindex&amp;gt;  sourcetype="mysource"  (SERVICE="ORDERS" AND  ORDERID=*$OrderNumber$* ) | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just a caveat, base searches use implied AND logic, so you could get rid of the parenthesis too.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;myindex&amp;gt;  sourcetype="mysource"  SERVICE="ORDERS" ORDERID=*$OrderNumber$*  | stats count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 02 Nov 2016 21:11:42 GMT</pubDate>
    <dc:creator>rjthibod</dc:creator>
    <dc:date>2016-11-02T21:11:42Z</dc:date>
    <item>
      <title>How to change a input text field to upper case and search for the changed value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203427#M176259</link>
      <description>&lt;P&gt;I have a form, which has a text field for users to enter the orderid. users can enter in lower case or upper case. The OrderID is stored in upper case in splunk.&lt;/P&gt;

&lt;P&gt;so I want to change the input text field to upper case and perform the search. &lt;/P&gt;

&lt;P&gt;Below is my search query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;myindex&amp;gt;  sourcetype="mysource"  (SERVICE="ORDERS" AND  ORDERID=*$OrderID$*   )| stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Below is the dashboard text field&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="text" token="OrderNumber" searchWhenChanged="true"&amp;gt;
      &amp;lt;label&amp;gt;Check Status of an Order or EXTID&amp;lt;/label&amp;gt;
     &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i tried changing the query to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;myindex&amp;gt;  sourcetype="mysource"  (SERVICE="ORDERS" AND  ORDERID=*upper($OrderID$)*   )| stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but that didnt work.&lt;/P&gt;

&lt;P&gt;Any help is appreciated. Thanks in Advance&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 18:33:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203427#M176259</guid>
      <dc:creator>vamshi245</dc:creator>
      <dc:date>2016-11-02T18:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a input text field to upper case and search for the changed value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203428#M176260</link>
      <description>&lt;P&gt;What version of Splunk you're in?&lt;/P&gt;

&lt;P&gt;Also, you're using the OrderID token in based search where case-insensitive match is done, so do you really need to change the case? It should be working fine anyways.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 19:02:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203428#M176260</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-11-02T19:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a input text field to upper case and search for the changed value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203429#M176261</link>
      <description>&lt;P&gt;Like @someson2 said, the base search is case-insensitive by default. However, it looks like you are using the wrong token. &lt;/P&gt;

&lt;P&gt;The input field you pasted uses the token name "OrderNumber" and not "OrderID" (see &lt;CODE&gt;token="OrderNumber"&lt;/CODE&gt;). If that is the case, your search should be the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;myindex&amp;gt;  sourcetype="mysource"  (SERVICE="ORDERS" AND  ORDERID=*$OrderNumber$* ) | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just a caveat, base searches use implied AND logic, so you could get rid of the parenthesis too.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;myindex&amp;gt;  sourcetype="mysource"  SERVICE="ORDERS" ORDERID=*$OrderNumber$*  | stats count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Nov 2016 21:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203429#M176261</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2016-11-02T21:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a input text field to upper case and search for the changed value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203430#M176262</link>
      <description>&lt;P&gt;When you add ORDERID filter in main search (i.e. first pipe with index=), the search performed is case independent i.e. &lt;BR /&gt;
ORDERID="ABCD" is same as ORDERID="abcd".&lt;/P&gt;

&lt;P&gt;If you want to force ORDERID to be case sensitive (Same goes for SERVICE="ORDERS" as well if you want upper case), you would need to add it as a where condition after first pipe i.e.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;myindex&amp;gt;  sourcetype="mysource"  | where (SERVICE="ORDERS" AND  ORDERID="upper($OrderID$)"   ) | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: For better search performance search filters should be applied before first pipe and not through where condition.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 21:13:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203430#M176262</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2016-11-02T21:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to change a input text field to upper case and search for the changed value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203431#M176263</link>
      <description>&lt;P&gt;thanks. i was not sure the search will be case insensitive. i figured that out and it is working now&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2016 22:33:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-change-a-input-text-field-to-upper-case-and-search-for/m-p/203431#M176263</guid>
      <dc:creator>vamshi245</dc:creator>
      <dc:date>2016-11-02T22:33:32Z</dc:date>
    </item>
  </channel>
</rss>

