<?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: Populate drop down with eval values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Populate-drop-down-with-eval-values/m-p/515146#M144616</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224267"&gt;@subhrangshu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the problem is with below part:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;fieldForLabel&amp;gt;sre_job_id&amp;lt;/fieldForLabel&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;fieldForValue&amp;gt;sre_job_id&amp;lt;/fieldForValue&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please change that to :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;fieldForLabel&amp;gt;JOB-ID-WITH-TIME&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;&amp;lt;fieldForValue&amp;gt;JOB-ID-WITH-TIME&amp;lt;/fieldForValue&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Please upvote my solution if it resolves the issue.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Aug 2020 09:01:37 GMT</pubDate>
    <dc:creator>Nisha18789</dc:creator>
    <dc:date>2020-08-20T09:01:37Z</dc:date>
    <item>
      <title>Populate drop down with eval values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Populate-drop-down-with-eval-values/m-p/515124#M144607</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Is it possible to populate drop down in Dashboard with eval values. I have a query as given below which returns me a string.&lt;/P&gt;&lt;P&gt;index=test sourcetype="testabc"&lt;BR /&gt;| rename sre_job_id as JOB_ID&lt;BR /&gt;| stats earliest(_time) AS Earliest by JOB_ID&lt;BR /&gt;| eval FirstEvent=strftime(Earliest,"%b %d, %Y %H:%M:%S")&lt;BR /&gt;| eval JOB_ID_STR=tostring(JOB_ID)&lt;BR /&gt;| eval JOB-ID-WITH-TIME=JOB_ID + "-" + FirstEvent&lt;BR /&gt;| table JOB-ID-WITH-TIME&lt;BR /&gt;| dedup JOB-ID-WITH-TIME&lt;BR /&gt;| sort JOB-ID-WITH-TIME&lt;/P&gt;&lt;P&gt;When I run this search with time as "Last 7 days", I get 3 records back.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;7220-Aug 13, 2020 11:22:00&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7320-Aug 13, 2020 11:46:32&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7800-Aug 14, 2020 04:50:06&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But when I use the same query in my drop-down in dashboard, I do not see any data. Below is the xml for the same:&lt;/P&gt;&lt;P&gt;&amp;lt;input type="dropdown" token="jobIDII" searchWhenChanged="true"&amp;gt;&lt;BR /&gt;&amp;lt;label&amp;gt;&lt;STRONG&gt;JOB ID II&lt;/STRONG&gt;&amp;lt;/label&amp;gt;&lt;BR /&gt;&amp;lt;fieldForLabel&amp;gt;sre_job_id&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;&amp;lt;fieldForValue&amp;gt;sre_job_id&amp;lt;/fieldForValue&amp;gt;&lt;BR /&gt;&amp;lt;search&amp;gt;&lt;BR /&gt;&amp;lt;query&amp;gt;index=test sourcetype="testabc"&lt;BR /&gt;| rename sre_job_id as JOB_ID&lt;BR /&gt;| stats earliest(_time) AS Earliest by JOB_ID&lt;BR /&gt;| eval FirstEvent=strftime(Earliest,"%b %d, %Y %H:%M:%S")&lt;BR /&gt;| eval JOB_ID_STR=tostring(JOB_ID)&lt;BR /&gt;| eval JOB-ID-WITH-TIME=JOB_ID + "-" + FirstEvent&lt;BR /&gt;| table JOB-ID-WITH-TIME&lt;BR /&gt;| dedup JOB-ID-WITH-TIME&lt;BR /&gt;| sort JOB-ID-WITH-TIME&amp;lt;/query&amp;gt;&lt;BR /&gt;&amp;lt;earliest&amp;gt;$timeToken.earliest$&amp;lt;/earliest&amp;gt;&lt;BR /&gt;&amp;lt;latest&amp;gt;$timeToken.latest$&amp;lt;/latest&amp;gt;&lt;BR /&gt;&amp;lt;/search&amp;gt;&lt;BR /&gt;&amp;lt;/input&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE&lt;/STRONG&gt;:&amp;nbsp;timeToken is the token for DURATION.&lt;/P&gt;&lt;P&gt;I also have a time input to filter the data for the above query in my dashboard. Please see the picture below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="screenshot" style="width: 690px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/10399i06D4693962A1439E/image-size/large?v=v2&amp;amp;px=999" role="button" title="drop-down-issue.jpg" alt="screenshot" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;screenshot&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you see above, JOB ID II is not populating any data and I cannot select anything from here.&lt;/P&gt;&lt;P&gt;Thanks for your time in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 06:28:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Populate-drop-down-with-eval-values/m-p/515124#M144607</guid>
      <dc:creator>subhrangshu</dc:creator>
      <dc:date>2020-08-20T06:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Populate drop down with eval values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Populate-drop-down-with-eval-values/m-p/515146#M144616</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/224267"&gt;@subhrangshu&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the problem is with below part:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;fieldForLabel&amp;gt;sre_job_id&amp;lt;/fieldForLabel&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;fieldForValue&amp;gt;sre_job_id&amp;lt;/fieldForValue&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please change that to :&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;fieldForLabel&amp;gt;JOB-ID-WITH-TIME&amp;lt;/fieldForLabel&amp;gt;&lt;BR /&gt;&amp;lt;fieldForValue&amp;gt;JOB-ID-WITH-TIME&amp;lt;/fieldForValue&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;Please upvote my solution if it resolves the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 09:01:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Populate-drop-down-with-eval-values/m-p/515146#M144616</guid>
      <dc:creator>Nisha18789</dc:creator>
      <dc:date>2020-08-20T09:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: Populate drop down with eval values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Populate-drop-down-with-eval-values/m-p/515149#M144619</link>
      <description>&lt;P&gt;Thanks a lot&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/215670"&gt;@Nisha18789&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Aug 2020 09:11:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Populate-drop-down-with-eval-values/m-p/515149#M144619</guid>
      <dc:creator>subhrangshu</dc:creator>
      <dc:date>2020-08-20T09:11:37Z</dc:date>
    </item>
  </channel>
</rss>

