<?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 How to query extracted field using SplunkJS in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-query-extracted-field-using-SplunkJS/m-p/422875#M7455</link>
    <description>&lt;P&gt;Hi I have extracted few fields using Regex from logs in Splunk. I can do search on those fields successfully  in Splunk WebUI. I want to use the same queries uisng SplunkJS in my Webapp. Every time I add the extracted fields in the SearchManager's search query on my page, I get No result found. &lt;BR /&gt;
How can I resolve this issue and continue to use SplunkJS in my webapp?&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2019 20:31:38 GMT</pubDate>
    <dc:creator>AshChakor</dc:creator>
    <dc:date>2019-04-23T20:31:38Z</dc:date>
    <item>
      <title>How to query extracted field using SplunkJS</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-query-extracted-field-using-SplunkJS/m-p/422875#M7455</link>
      <description>&lt;P&gt;Hi I have extracted few fields using Regex from logs in Splunk. I can do search on those fields successfully  in Splunk WebUI. I want to use the same queries uisng SplunkJS in my Webapp. Every time I add the extracted fields in the SearchManager's search query on my page, I get No result found. &lt;BR /&gt;
How can I resolve this issue and continue to use SplunkJS in my webapp?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2019 20:31:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-query-extracted-field-using-SplunkJS/m-p/422875#M7455</guid>
      <dc:creator>AshChakor</dc:creator>
      <dc:date>2019-04-23T20:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to query extracted field using SplunkJS</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-query-extracted-field-using-SplunkJS/m-p/422876#M7456</link>
      <description>&lt;P&gt;Ok I found a work around for this. I used regex expression to extract fields and its producing the same output just as in splunkUI with extracted or transformed fields. &lt;BR /&gt;
Splunk UI Extracted field : EXTRACT-TransUID    Inline  ^[^[\n]*[(?P&lt;TRANSUID&gt;[^]]+) &lt;/TRANSUID&gt;&lt;/P&gt;

&lt;P&gt;SplunkUI search: index="myindex" host="myhost" | transaction TransUID &lt;/P&gt;

&lt;P&gt;When I used the above search in my webapplication uisng SplunkJS, it wouldn't work.&lt;BR /&gt;
So I used regex as below in the search and its working just as it did in SplunkUI &lt;BR /&gt;
'index="myindex" host="myhost" |  rex field=_raw "^[^[\n]*\[(?P&amp;lt;TransUIDTest&amp;gt;[^]]+)" | transaction TransUIDTest'&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2019 12:54:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-query-extracted-field-using-SplunkJS/m-p/422876#M7456</guid>
      <dc:creator>AshChakor</dc:creator>
      <dc:date>2019-04-25T12:54:31Z</dc:date>
    </item>
  </channel>
</rss>

