<?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: Sub search not returning string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490364#M141350</link>
    <description>&lt;P&gt;It return the raw event data. If I table "department" it is correct.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8520iD0882719BBD5A70F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 20:26:06 GMT</pubDate>
    <dc:creator>joeybroesky</dc:creator>
    <dc:date>2020-03-10T20:26:06Z</dc:date>
    <item>
      <title>Sub search not returning string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490360#M141346</link>
      <description>&lt;P&gt;Why does a sub search return a boolean value? I am expecting to see the department value.&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;index="activedirectory" (userPrincipalName=*@emailaddress.ca)&lt;BR /&gt;
| eval From_Sub_Search=tostring([search index="activedirectory" (userPrincipalName="*@emailaddress.ca") | return department])&lt;BR /&gt;
| eval From_Department=tostring(department)&lt;BR /&gt;
| table From_Sub_Search, From_Department&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;Search shown below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8521iA527B06B1512B89B/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 22:46:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490360#M141346</guid>
      <dc:creator>joeybroesky</dc:creator>
      <dc:date>2020-06-22T22:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sub search not returning string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490361#M141347</link>
      <description>&lt;P&gt;try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="activedirectory" (userPrincipalName=*@emailaddress.ca) | eval From_Sub_Search=tostring([search index="activedirectory" (userPrincipalName="*@emailaddress.ca") | return $department | format] ) | eval From_Department=tostring(department) | table From_Sub_Search, From_Department
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2020 20:08:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490361#M141347</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-10T20:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sub search not returning string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490362#M141348</link>
      <description>&lt;P&gt;This returns "Null" for From_Sub_Search instead of "True".&lt;/P&gt;

&lt;P&gt;See accident answer below.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:32:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490362#M141348</guid>
      <dc:creator>joeybroesky</dc:creator>
      <dc:date>2020-09-30T04:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sub search not returning string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490363#M141349</link>
      <description>&lt;P&gt;what is the output of &lt;EM&gt;index="activedirectory" (userPrincipalName="&lt;/EM&gt;@emailaddress.ca") | fields department ?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 20:16:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490363#M141349</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-10T20:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sub search not returning string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490364#M141350</link>
      <description>&lt;P&gt;It return the raw event data. If I table "department" it is correct.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/8520iD0882719BBD5A70F/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 20:26:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490364#M141350</guid>
      <dc:creator>joeybroesky</dc:creator>
      <dc:date>2020-03-10T20:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sub search not returning string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490365#M141351</link>
      <description>&lt;P&gt;Added format to the end of the sub search resolved the issue.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index="activedirectory" (userPrincipalName=*@emailaddress.ca)&lt;BR /&gt;
| eval From_Sub_Search=tostring([search index="activedirectory" (userPrincipalName="*@emailaddress.ca") | return $department | format])&lt;BR /&gt;
| eval From_Department=tostring(department)&lt;BR /&gt;
| table From_Sub_Search, From_Department&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 21:47:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490365#M141351</guid>
      <dc:creator>joeybroesky</dc:creator>
      <dc:date>2020-03-10T21:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sub search not returning string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490366#M141352</link>
      <description>&lt;P&gt;That's great! I updated my answer so that it can help others looking for similar problem.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 07:06:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Sub-search-not-returning-string/m-p/490366#M141352</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-11T07:06:49Z</dc:date>
    </item>
  </channel>
</rss>

