<?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: Can you help me update some field values from a lookup table? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444248#M125986</link>
    <description>&lt;P&gt;Hi @pench2k19&lt;/P&gt;

&lt;P&gt;Try this and let me know. I considered two fields in lookup with date and time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;date,time
BUS_DT+1,11:00
BUS_DT+0,12:00


| inputlookup panel.csv 
| eval date1 = case(date="BUS_DT+1",strftime(now(),"%Y-%m-%d").",".time,date="BUS_DT+0",strftime(relative_time(time(), "-d"),"%Y-%m-%d".",".time))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 04 Feb 2019 12:56:41 GMT</pubDate>
    <dc:creator>vnravikumar</dc:creator>
    <dc:date>2019-02-04T12:56:41Z</dc:date>
    <item>
      <title>Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444247#M125985</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;I have the following field values in a look up file&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;BUS_DT+1,11:00
BUS_DT+0,12:00
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i want to update the field values into my query result. When there is &lt;STRONG&gt;BUS_DT+1&lt;/STRONG&gt; value, it should replace today's date in yyyy-mm-dd format, and when there is &lt;STRONG&gt;BUS_DT+0&lt;/STRONG&gt; value, it should print yesterday's date.&lt;/P&gt;

&lt;P&gt;The expected result respectively is &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2019-02-04, 11:00
2019-02-03,12:00
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;can anyone help on this use case. Thank you in advance&lt;/P&gt;

&lt;P&gt;@vnravikumar @jkat54 @woodcock &lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 12:41:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444247#M125985</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2019-02-04T12:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444248#M125986</link>
      <description>&lt;P&gt;Hi @pench2k19&lt;/P&gt;

&lt;P&gt;Try this and let me know. I considered two fields in lookup with date and time.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;date,time
BUS_DT+1,11:00
BUS_DT+0,12:00


| inputlookup panel.csv 
| eval date1 = case(date="BUS_DT+1",strftime(now(),"%Y-%m-%d").",".time,date="BUS_DT+0",strftime(relative_time(time(), "-d"),"%Y-%m-%d".",".time))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Feb 2019 12:56:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444248#M125986</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-02-04T12:56:41Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444249#M125987</link>
      <description>&lt;P&gt;BUS_DT+1,11:00&lt;BR /&gt;
BUS_DT+0,12:00&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex “\+(?&amp;lt;dayCount&amp;gt;\d+)\,(?&amp;lt;hourCount&amp;gt;\d+):(?&amp;lt;minuteCount&amp;gt;\d+)”
| eval _time=case(dayCount==1,now()+86400, dayCount==0,now(),1==1,0)
| eval newTimeStamp=strftime(strptime(_time, “%s),”%y-%m-%d, %H:%M:%S)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:08:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444249#M125987</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T23:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444250#M125988</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/156785"&gt;@vnravikumar&lt;/a&gt;  sorry for making you confused..its not two fields , the values belongs to single field&lt;/P&gt;

&lt;P&gt;sl_time&lt;BR /&gt;
BUS_DT+1,11:00&lt;BR /&gt;
BUS_DT+0,12:00&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:04:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444250#M125988</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2020-09-29T23:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444251#M125989</link>
      <description>&lt;P&gt;Hi @pench2k19&lt;/P&gt;

&lt;P&gt;try this&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Updated&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| inputlookup panel.csv | rex field="sl_time" "(?P&amp;lt;date&amp;gt;.*)\,(?&amp;lt;time&amp;gt;.*)" | eval sl_time = case(date="BUS_DT+1",strftime(now(),"%Y-%m-%d").",".time,date="BUS_DT+0",strftime(relative_time(time(), "-d"),"%Y-%m-%d".",".time))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Feb 2019 13:21:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444251#M125989</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-02-04T13:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444252#M125990</link>
      <description>&lt;P&gt;the folloiwng giving me error &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/199197"&gt;@jkat54&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;| inputlookup SLA.csv  | rex field=SOR_TDQ_FAIL_SLA_THRESHOLD “+(?\d+)\,(?\d+):(?\d+)”&lt;BR /&gt;
 | eval _time=case(dayCount==1,now()+86400, dayCount==0,now(),1==1,0)&lt;BR /&gt;
 | eval newTimeStamp=strftime(strptime(_time, “%s),”%y-%m-%d, %H:%M:%S) |table newTimeStamp&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444252#M125990</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2020-09-29T23:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444253#M125991</link>
      <description>&lt;P&gt;try above query and let me know&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 13:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444253#M125991</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-02-04T13:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444254#M125992</link>
      <description>&lt;P&gt;this works..thank you&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 13:33:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444254#M125992</guid>
      <dc:creator>pench2k19</dc:creator>
      <dc:date>2019-02-04T13:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me update some field values from a lookup table?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444255#M125993</link>
      <description>&lt;P&gt;welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Feb 2019 13:45:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-update-some-field-values-from-a-lookup-table/m-p/444255#M125993</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-02-04T13:45:51Z</dc:date>
    </item>
  </channel>
</rss>

