<?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 How to update a new row in lookup file using eval command or some other command? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607614#M211271</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I have a lookup file which have 5 entry with filed name and field value as below&lt;/P&gt;
&lt;P&gt;"New_field"="yes", New_field1="yes", "New_field3"="yes", New_field4="Yes"&lt;/P&gt;
&lt;P&gt;I need to append a new row to the lookup file with all the field value as "No". I am using the below command to do this&lt;/P&gt;
&lt;P&gt;|inputlookup sample_demo.csv&lt;BR /&gt;|append [|inputlookup sample_demo.csv|eval "New_field"="no", New_field1="no", "New_field3"="no", New_field4="no"]&lt;/P&gt;
&lt;P&gt;this query is adding the new row but its adding 5 new row... I just need one row to append with new field value as "no"&lt;/P&gt;
&lt;P&gt;Can anyone please guide me on this, as what am i missing in the query&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 30 Jul 2022 16:05:05 GMT</pubDate>
    <dc:creator>Rajiv_splunk</dc:creator>
    <dc:date>2022-07-30T16:05:05Z</dc:date>
    <item>
      <title>How to update a new row in lookup file using eval command or some other command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607614#M211271</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;
&lt;P&gt;I have a lookup file which have 5 entry with filed name and field value as below&lt;/P&gt;
&lt;P&gt;"New_field"="yes", New_field1="yes", "New_field3"="yes", New_field4="Yes"&lt;/P&gt;
&lt;P&gt;I need to append a new row to the lookup file with all the field value as "No". I am using the below command to do this&lt;/P&gt;
&lt;P&gt;|inputlookup sample_demo.csv&lt;BR /&gt;|append [|inputlookup sample_demo.csv|eval "New_field"="no", New_field1="no", "New_field3"="no", New_field4="no"]&lt;/P&gt;
&lt;P&gt;this query is adding the new row but its adding 5 new row... I just need one row to append with new field value as "no"&lt;/P&gt;
&lt;P&gt;Can anyone please guide me on this, as what am i missing in the query&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jul 2022 16:05:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607614#M211271</guid>
      <dc:creator>Rajiv_splunk</dc:creator>
      <dc:date>2022-07-30T16:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to update a new row in lookup file using eval command or some other command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607616#M211272</link>
      <description>&lt;P&gt;There's no need to re-read the lookup file in the append.&amp;nbsp; Just append the new fields and write the whole thing back to the lookup.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|inputlookup sample_demo.csv
|append [ | makeresults 
  |eval "New_field"="no", New_field1="no", "New_field3"="no", New_field4="no"]
| outputlookup sample_demo.csv&lt;/LI-CODE&gt;&lt;P&gt;You also can do it without reading the lookup.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval "New_field"="no", New_field1="no", "New_field3"="no", New_field4="no"
| table New_field, New_field1, New_field2, New_field3, New_field4
| outputlookup append=1 sample_demo.csv&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 30 Jul 2022 16:47:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607616#M211272</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-07-30T16:47:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to update a new row in lookup file using eval command or some other command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607618#M211273</link>
      <description>&lt;P&gt;Thanks&amp;nbsp; a ton &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt; for your quick reply.&amp;nbsp; It works like a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jul 2022 17:13:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607618#M211273</guid>
      <dc:creator>Rajiv_splunk</dc:creator>
      <dc:date>2022-07-30T17:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to update a new row in lookup file using eval command or some other command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607619#M211274</link>
      <description>&lt;P&gt;I got stuck in an another issue..how would i add multiple rows in lookup file through query if only one field vlaue i have to change. say i also have to add all the field value as "yes" and all the field value as "accepted"&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jul 2022 17:16:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607619#M211274</guid>
      <dc:creator>Rajiv_splunk</dc:creator>
      <dc:date>2022-07-30T17:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to update a new row in lookup file using eval command or some other command?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607620#M211275</link>
      <description>&lt;P&gt;i got it fixed...run the eval command again...Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jul 2022 17:22:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-update-a-new-row-in-lookup-file-using-eval-command-or/m-p/607620#M211275</guid>
      <dc:creator>Rajiv_splunk</dc:creator>
      <dc:date>2022-07-30T17:22:25Z</dc:date>
    </item>
  </channel>
</rss>

