<?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: How do I assign value to list or array and use it in where condition? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681277#M232810</link>
    <description>&lt;P&gt;You can "nest" mvappends to add multiple values at once. You can also use split() to make a multivalued field from a string of delimited values.&lt;/P&gt;&lt;P&gt;You can use isnull() to check if mvfind returned a value or not.&lt;/P&gt;&lt;P&gt;One caveat about mvfind though - it matches based on regex so you might get some unexpected results if you're not careful&lt;/P&gt;</description>
    <pubDate>Tue, 19 Mar 2024 22:04:46 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2024-03-19T22:04:46Z</dc:date>
    <item>
      <title>How do I assign value to list or array and use it in where condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681250#M232799</link>
      <description>&lt;P&gt;How do I assign value to list or array and use it in where condition?&lt;BR /&gt;Thank you in advance!!&lt;BR /&gt;&lt;BR /&gt;For example:&lt;BR /&gt;I tried to search if number 4 is in array/list of number between 0 to 6.&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index = test
| eval   list-var = (0,1,2,3,4,5,6)
| eval num = 4
| search num IN list-var&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 20:14:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681250#M232799</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-19T20:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign value to list or array and use it in where condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681268#M232806</link>
      <description>&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvfind.28.26lt.3Bmv.26gt.3B.2C.26lt.3Bregex.26gt.3B.29" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/MultivalueEvalFunctions#mvfind.28.26lt.3Bmv.26gt.3B.2C.26lt.3Bregex.26gt.3B.29&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 21:28:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681268#M232806</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-03-19T21:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign value to list or array and use it in where condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681275#M232809</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;So, is multivalue the only way to use list/array?&lt;BR /&gt;If I want to assign 7 values, should I use mvappend 7 times like the following?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval test = mvappend("0", test)
| eval test = mvappend("1", test)
| eval test = mvappend("2", test)
| eval test = mvappend("3", test)
| eval test = mvappend("4", test)
| eval test = mvappend("5", test)
| eval test = mvappend("6", test)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How do I get true/false return if I want to see if number 5 is in the array/list?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;MVfind only give me the position of 5, which is 1.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| eval n = mvfind(test, "5")&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 22:02:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681275#M232809</guid>
      <dc:creator>LearningGuy</dc:creator>
      <dc:date>2024-03-19T22:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I assign value to list or array and use it in where condition?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681277#M232810</link>
      <description>&lt;P&gt;You can "nest" mvappends to add multiple values at once. You can also use split() to make a multivalued field from a string of delimited values.&lt;/P&gt;&lt;P&gt;You can use isnull() to check if mvfind returned a value or not.&lt;/P&gt;&lt;P&gt;One caveat about mvfind though - it matches based on regex so you might get some unexpected results if you're not careful&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2024 22:04:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-assign-value-to-list-or-array-and-use-it-in-where/m-p/681277#M232810</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-03-19T22:04:46Z</dc:date>
    </item>
  </channel>
</rss>

