<?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: Set attribute for all elements having a certain ID when 2 values are availabe witin the elements having this id in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Set-attribute-for-all-elements-having-a-certain-ID-when-2-values/m-p/621579#M216060</link>
    <description>&lt;LI-CODE lang="markup"&gt;| eventstats values(activity) as activities by id
| eval istrue=if(isnotnull(mvfind(activities,"a")) and isnotnull(mvfind(activities,"b")),"true","false")&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 21 Nov 2022 13:40:08 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-11-21T13:40:08Z</dc:date>
    <item>
      <title>Set attribute for all elements having a certain ID when 2 values are availabe witin the elements having this id</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-attribute-for-all-elements-having-a-certain-ID-when-2-values/m-p/621554#M216052</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I try to set an attribute to true for all elements having a certain ID, when 2 defined activities are available for that certain ID.&lt;/P&gt;&lt;P&gt;In my optinion the corresponding SQL query would be:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Update t set isvalid = true where id in (select id from t group by id having activity = 'a' and activity = 'b')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A result might look like:&lt;/P&gt;&lt;TABLE border="1" width="83.33333333333334%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;&lt;STRONG&gt;id&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="34.26212590299278%" height="25px"&gt;&lt;STRONG&gt;activitiy&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="32.40454076367389%" height="25px"&gt;&lt;STRONG&gt;istrue&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;001&lt;/TD&gt;&lt;TD width="34.26212590299278%" height="25px"&gt;a&lt;/TD&gt;&lt;TD width="32.40454076367389%" height="25px"&gt;true&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;001&lt;/TD&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;TD&gt;true&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;001&lt;/TD&gt;&lt;TD width="34.26212590299278%" height="25px"&gt;c&lt;/TD&gt;&lt;TD width="32.40454076367389%" height="25px"&gt;true&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;002&lt;/TD&gt;&lt;TD width="34.26212590299278%" height="25px"&gt;a&lt;/TD&gt;&lt;TD width="32.40454076367389%" height="25px"&gt;false&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;002&lt;/TD&gt;&lt;TD width="34.26212590299278%" height="25px"&gt;c&lt;/TD&gt;&lt;TD width="32.40454076367389%" height="25px"&gt;false&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;002&lt;/TD&gt;&lt;TD width="34.26212590299278%" height="25px"&gt;d&lt;/TD&gt;&lt;TD width="32.40454076367389%" height="25px"&gt;false&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;003&lt;/TD&gt;&lt;TD width="34.26212590299278%" height="25px"&gt;a&lt;/TD&gt;&lt;TD width="32.40454076367389%" height="25px"&gt;true&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="16.666666666666668%" height="25px"&gt;003&lt;/TD&gt;&lt;TD width="34.26212590299278%" height="25px"&gt;b&lt;/TD&gt;&lt;TD width="32.40454076367389%" height="25px"&gt;true&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there an option to execute this in SPL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 11:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-attribute-for-all-elements-having-a-certain-ID-when-2-values/m-p/621554#M216052</guid>
      <dc:creator>lukas1</dc:creator>
      <dc:date>2022-11-21T11:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Set attribute for all elements having a certain ID when 2 values are availabe witin the elements having this id</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-attribute-for-all-elements-having-a-certain-ID-when-2-values/m-p/621579#M216060</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eventstats values(activity) as activities by id
| eval istrue=if(isnotnull(mvfind(activities,"a")) and isnotnull(mvfind(activities,"b")),"true","false")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:40:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-attribute-for-all-elements-having-a-certain-ID-when-2-values/m-p/621579#M216060</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-11-21T13:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set attribute for all elements having a certain ID when 2 values are availabe witin the elements having this id</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Set-attribute-for-all-elements-having-a-certain-ID-when-2-values/m-p/621581#M216061</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Working now &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 13:55:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Set-attribute-for-all-elements-having-a-certain-ID-when-2-values/m-p/621581#M216061</guid>
      <dc:creator>lukas1</dc:creator>
      <dc:date>2022-11-21T13:55:11Z</dc:date>
    </item>
  </channel>
</rss>

