<?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 [help]eval expression for dynamic field is invalid in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-eval-expression-for-dynamic-field-is-invalid/m-p/482836#M135228</link>
    <description>&lt;P&gt;Hi Team, &lt;/P&gt;

&lt;P&gt;I have below appendpipe clause &lt;BR /&gt;
  | appendpipe &lt;BR /&gt;
     [| eventstats first(eval("step3".mvindex(list_behavior,2))) as start,  &lt;STRONG&gt;first(eval(if(isnull(mvindex(list_behavior,3))), "step4".mvindex(list_behavior,3), "exit"))&lt;/STRONG&gt; as end by UserID]&lt;/P&gt;

&lt;P&gt;But I got the an error when searching&lt;BR /&gt;
&lt;STRONG&gt;Error in 'eventstats' command: The eval expression for dynamic field 'eval(if(isnull(mvindex(list_behavior,3))), "step4".mvindex(list_behavior,3), "exit")' is invalid. Error='The operator at ', "Cherie", "exit"' is invalid.'.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I want to judge first that if the index list_behavior[3] exist or not. If exist, keep the original value, if not, fill in with "exist"&lt;/P&gt;

&lt;P&gt;What  the correct syntax format should be here ?&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
Cherie&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 03:39:18 GMT</pubDate>
    <dc:creator>cheriemilk</dc:creator>
    <dc:date>2020-09-30T03:39:18Z</dc:date>
    <item>
      <title>[help]eval expression for dynamic field is invalid</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-eval-expression-for-dynamic-field-is-invalid/m-p/482836#M135228</link>
      <description>&lt;P&gt;Hi Team, &lt;/P&gt;

&lt;P&gt;I have below appendpipe clause &lt;BR /&gt;
  | appendpipe &lt;BR /&gt;
     [| eventstats first(eval("step3".mvindex(list_behavior,2))) as start,  &lt;STRONG&gt;first(eval(if(isnull(mvindex(list_behavior,3))), "step4".mvindex(list_behavior,3), "exit"))&lt;/STRONG&gt; as end by UserID]&lt;/P&gt;

&lt;P&gt;But I got the an error when searching&lt;BR /&gt;
&lt;STRONG&gt;Error in 'eventstats' command: The eval expression for dynamic field 'eval(if(isnull(mvindex(list_behavior,3))), "step4".mvindex(list_behavior,3), "exit")' is invalid. Error='The operator at ', "Cherie", "exit"' is invalid.'.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I want to judge first that if the index list_behavior[3] exist or not. If exist, keep the original value, if not, fill in with "exist"&lt;/P&gt;

&lt;P&gt;What  the correct syntax format should be here ?&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;BR /&gt;
Cherie&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:39:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-eval-expression-for-dynamic-field-is-invalid/m-p/482836#M135228</guid>
      <dc:creator>cheriemilk</dc:creator>
      <dc:date>2020-09-30T03:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: [help]eval expression for dynamic field is invalid</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-eval-expression-for-dynamic-field-is-invalid/m-p/482837#M135229</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;....
| appendpipe
[| eventstats first(eval("step3".mvindex(list_behavior,2))) as start, first(eval(if(mvcount(list_behavior)=3, "step4".mvindex(list_behavior,3), "exit"))) as end by UserID]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, @cheriemilk&lt;BR /&gt;
how about this?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 09:14:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-eval-expression-for-dynamic-field-is-invalid/m-p/482837#M135229</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-14T09:14:01Z</dc:date>
    </item>
  </channel>
</rss>

