<?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 Eval strftime not working with Linked Search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-strftime-not-working-with-Linked-Search/m-p/670928#M229958</link>
    <description>&lt;P&gt;Hello! Still very new to Splunk so hoping to get some clarification.&lt;/P&gt;&lt;P&gt;My dashboard is currently using a post-process search as its base and filtering data from there. On my dashboard objects, I have a &amp;lt;link&amp;gt;&amp;lt;/link&amp;gt; which works fine until adding an eval strftime to convert the time to human readable.&lt;/P&gt;&lt;P&gt;Running this search as a new search manually with the eval works fine. However, the link directs to a blank search. Removing the eval statement makes the link work.&lt;BR /&gt;&lt;BR /&gt;Link:&lt;BR /&gt;&amp;lt;link target="_blank"&amp;gt;&lt;/P&gt;&lt;P&gt;search?q=| inputlookup io_vuln_data_lookup where $severity$ | search last_found &amp;amp;gt;= "$info_min_time$" AND last_found &amp;amp;lt;= "$info_max_time$"&lt;/P&gt;&lt;P&gt;| eval last_found = strftime(last_found, "%c")&lt;/P&gt;&lt;P&gt;| table dns_name,&amp;nbsp; last_found | where lower(state)!="fixed"&lt;/P&gt;&lt;P&gt;&amp;lt;/link&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I was hoping to only do this conversion for a single dashboard object, so didn't want to convert the entire lookup. Would be amazing if I could get this search to work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2023 05:39:19 GMT</pubDate>
    <dc:creator>Jack_Accent</dc:creator>
    <dc:date>2023-12-06T05:39:19Z</dc:date>
    <item>
      <title>Eval strftime not working with Linked Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-strftime-not-working-with-Linked-Search/m-p/670928#M229958</link>
      <description>&lt;P&gt;Hello! Still very new to Splunk so hoping to get some clarification.&lt;/P&gt;&lt;P&gt;My dashboard is currently using a post-process search as its base and filtering data from there. On my dashboard objects, I have a &amp;lt;link&amp;gt;&amp;lt;/link&amp;gt; which works fine until adding an eval strftime to convert the time to human readable.&lt;/P&gt;&lt;P&gt;Running this search as a new search manually with the eval works fine. However, the link directs to a blank search. Removing the eval statement makes the link work.&lt;BR /&gt;&lt;BR /&gt;Link:&lt;BR /&gt;&amp;lt;link target="_blank"&amp;gt;&lt;/P&gt;&lt;P&gt;search?q=| inputlookup io_vuln_data_lookup where $severity$ | search last_found &amp;amp;gt;= "$info_min_time$" AND last_found &amp;amp;lt;= "$info_max_time$"&lt;/P&gt;&lt;P&gt;| eval last_found = strftime(last_found, "%c")&lt;/P&gt;&lt;P&gt;| table dns_name,&amp;nbsp; last_found | where lower(state)!="fixed"&lt;/P&gt;&lt;P&gt;&amp;lt;/link&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I was hoping to only do this conversion for a single dashboard object, so didn't want to convert the entire lookup. Would be amazing if I could get this search to work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 05:39:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-strftime-not-working-with-Linked-Search/m-p/670928#M229958</guid>
      <dc:creator>Jack_Accent</dc:creator>
      <dc:date>2023-12-06T05:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Eval strftime not working with Linked Search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-strftime-not-working-with-Linked-Search/m-p/670981#M229964</link>
      <description>&lt;P&gt;In SimpleXML, certain characters must be entered with HTML entities. (Specifically, double quotes, greater than, less than, and so on.) &amp;nbsp;More generally, GET URLs are best encoded without special characters. &amp;nbsp;So, replace &lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;| eval last_found = strftime(last_found, "%c")&lt;/FONT&gt; with&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;%3D%20strftime(last_found%2C%20%22%25c%22)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Meanwhile I do not know how the cited URL could "works fine till." &amp;nbsp;If you are entering these in source editor, you can try replacing double quotes with &amp;amp;quot;, i.e.,&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval last_found = strftime(last_found, &amp;amp;quot;%c&amp;amp;quot;)&lt;/LI-CODE&gt;&lt;P&gt;I recommend using the visual editor, however. &amp;nbsp;There, you can enter SPL as SPL.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 09:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-strftime-not-working-with-Linked-Search/m-p/670981#M229964</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-12-06T09:38:02Z</dc:date>
    </item>
  </channel>
</rss>

