<?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: Splunk query response in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595751#M10607</link>
    <description>&lt;P&gt;Lovely thank you.&amp;nbsp; Just now figured out that even the below works&lt;/P&gt;&lt;P&gt;| rename transactionid as search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Search/Changetheformatofsubsearchresults" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/Search/Changetheformatofsubsearchresults&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The following search looks for a value in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;clID&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field that is associated with a name token or field value. The clID value is then used to search for several sources.&lt;/P&gt;&lt;P class=""&gt;index=myindex [search index=myindex host=myhost MyName | top limit=1 clID | fields clID ]&lt;/P&gt;&lt;P&gt;The subsearch returns the field and value in the format:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;( (clID="0050834ja") )&lt;/P&gt;&lt;P&gt;To return only the value,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0050834ja, rename the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;clID&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;search&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the subsearch. For example:&lt;/P&gt;&lt;P class=""&gt;index=myindex [search index=myindex host=myhost MyName | top limit=1 clID | fields clID | rename clID as search ]&lt;/P&gt;&lt;P&gt;When the field is named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;search&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;query, the field name is dropped and the implicit&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;| format&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;command at the end of the subsearch returns only the value.&lt;/P&gt;&lt;P&gt;If you return multiple values, such as specifying&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;...| top limit=3, the subsearch returns each of the values with the boolean OR operator between the values. For example, if the previous search example used&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;...| top limit=3, the values returned from the subsearch are&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;( ( value1 ) OR ( value2 ) OR ( value3 ) ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Apr 2022 08:04:17 GMT</pubDate>
    <dc:creator>msg4sunil</dc:creator>
    <dc:date>2022-04-28T08:04:17Z</dc:date>
    <item>
      <title>How to retrieve specific Splunk query response</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595743#M10603</link>
      <description>&lt;P&gt;Team,&lt;/P&gt;
&lt;P&gt;index sourcetype=app_* some_search | rex "\[(?&amp;lt;transactionid&amp;gt;[A-Za-z0-9]+)\]" | rename transactionid as q|table q|format&lt;/P&gt;
&lt;P&gt;returns me&lt;/P&gt;
&lt;P&gt;( ( q="100223608103" ) OR ( q="D202204021000676" ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I get the below instead?&lt;/P&gt;
&lt;P&gt;( ( "100223608103" ) OR ("D202204021000676" ) )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 18:07:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595743#M10603</guid>
      <dc:creator>msg4sunil</dc:creator>
      <dc:date>2022-04-28T18:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query response</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595748#M10604</link>
      <description>&lt;P&gt;Not exactly what you want, but replace format with&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| return 999 $q&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;that will give you&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(100223608103) OR (D202204021000676)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 07:54:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595748#M10604</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-04-28T07:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query response</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595749#M10605</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rename transactionid as query&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 28 Apr 2022 07:56:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595749#M10605</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-04-28T07:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query response</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595750#M10606</link>
      <description>&lt;P&gt;I always forget 'query' keyword&lt;/P&gt;&lt;P&gt;Here's the doco on those keywords&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/8.2.2202/Search/Changetheformatofsubsearchresults" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/8.2.2202/Search/Changetheformatofsubsearchresults&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 07:59:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595750#M10606</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-04-28T07:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query response</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595751#M10607</link>
      <description>&lt;P&gt;Lovely thank you.&amp;nbsp; Just now figured out that even the below works&lt;/P&gt;&lt;P&gt;| rename transactionid as search&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Search/Changetheformatofsubsearchresults" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/Search/Changetheformatofsubsearchresults&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The following search looks for a value in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;clID&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field that is associated with a name token or field value. The clID value is then used to search for several sources.&lt;/P&gt;&lt;P class=""&gt;index=myindex [search index=myindex host=myhost MyName | top limit=1 clID | fields clID ]&lt;/P&gt;&lt;P&gt;The subsearch returns the field and value in the format:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;( (clID="0050834ja") )&lt;/P&gt;&lt;P&gt;To return only the value,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;0050834ja, rename the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;clID&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;field to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;search&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;in the subsearch. For example:&lt;/P&gt;&lt;P class=""&gt;index=myindex [search index=myindex host=myhost MyName | top limit=1 clID | fields clID | rename clID as search ]&lt;/P&gt;&lt;P&gt;When the field is named&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;search&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;query, the field name is dropped and the implicit&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;| format&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;command at the end of the subsearch returns only the value.&lt;/P&gt;&lt;P&gt;If you return multiple values, such as specifying&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;...| top limit=3, the subsearch returns each of the values with the boolean OR operator between the values. For example, if the previous search example used&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;...| top limit=3, the values returned from the subsearch are&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;( ( value1 ) OR ( value2 ) OR ( value3 ) ).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Apr 2022 08:04:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-retrieve-specific-Splunk-query-response/m-p/595751#M10607</guid>
      <dc:creator>msg4sunil</dc:creator>
      <dc:date>2022-04-28T08:04:17Z</dc:date>
    </item>
  </channel>
</rss>

