<?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: Giving multiple events a field based on one events value in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Giving-multiple-events-a-field-based-on-one-events-value/m-p/534006#M150914</link>
    <description>&lt;LI-CODE lang="markup"&gt;| makeresults count=5 
| streamstats count as ID 
| eval RequiredValue=mvindex(split("Yes,No",","),random() % 2) 
| rename COMMENT as "This is sample. Each time you search, the value changes.
From here, the logic." 
| eventstats count(eval(RequiredValue="Yes")) as ConditionalValue 
| eval ConditionalValue=if(ConditionalValue &amp;gt; 0,"Yes","No") 
| table ID RequiredValue ConditionalValue&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 23 Dec 2020 23:25:39 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-12-23T23:25:39Z</dc:date>
    <item>
      <title>Giving multiple events a field based on one events value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Giving-multiple-events-a-field-based-on-one-events-value/m-p/533994#M150909</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;What I'm trying to do is if check if any of the events meet a criteria and if so I want to assign all events a particular field and value.&lt;BR /&gt;&lt;BR /&gt;E.G.&lt;BR /&gt;I want to check if any of the RequiredValue field has a value of "Yes". If so all events get the ConditionalValue of "Yes" if not they all get a value of "No"&lt;/P&gt;&lt;TABLE border="1" width="102.7669363012542%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;ID&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;RequiredValue&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;ConditionalValue&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;1&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;No&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;Yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;2&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;No&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;Yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;3&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;No&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;Yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;4&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;Yes&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;Yes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%"&gt;5&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;No&lt;/TD&gt;&lt;TD width="16.666666666666668%"&gt;&lt;P&gt;Yes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated. Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 20:53:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Giving-multiple-events-a-field-based-on-one-events-value/m-p/533994#M150909</guid>
      <dc:creator>TooManyQuestion</dc:creator>
      <dc:date>2020-12-23T20:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Giving multiple events a field based on one events value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Giving-multiple-events-a-field-based-on-one-events-value/m-p/534006#M150914</link>
      <description>&lt;LI-CODE lang="markup"&gt;| makeresults count=5 
| streamstats count as ID 
| eval RequiredValue=mvindex(split("Yes,No",","),random() % 2) 
| rename COMMENT as "This is sample. Each time you search, the value changes.
From here, the logic." 
| eventstats count(eval(RequiredValue="Yes")) as ConditionalValue 
| eval ConditionalValue=if(ConditionalValue &amp;gt; 0,"Yes","No") 
| table ID RequiredValue ConditionalValue&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 23 Dec 2020 23:25:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Giving-multiple-events-a-field-based-on-one-events-value/m-p/534006#M150914</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-12-23T23:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Giving multiple events a field based on one events value</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Giving-multiple-events-a-field-based-on-one-events-value/m-p/534070#M150935</link>
      <description>&lt;P&gt;Thanks so much! Worked like a charm!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Dec 2020 17:56:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Giving-multiple-events-a-field-based-on-one-events-value/m-p/534070#M150935</guid>
      <dc:creator>TooManyQuestion</dc:creator>
      <dc:date>2020-12-24T17:56:58Z</dc:date>
    </item>
  </channel>
</rss>

