<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>reject function used with index function</title><link>https://community.appian.com/discussions/f/new-to-appian/35525/reject-function-used-with-index-function</link><description>How can we fetch only not null cases from this index function. pls share the detailed query</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138534?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 13:40:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1f5c801c-a7e2-4449-8384-cd18aab76e42</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;My approach is already very easy to adapt for the use case of &amp;quot;get all rows where C26 is not null&amp;quot;, and allows us to loop only once, instead of nesting together index() and whereContains() and index().&lt;/p&gt;
&lt;p&gt;(As an aside, this is why it&amp;#39;s important to phrase initial questions carefully and include relevant detail and/or information about your use case.)&lt;/p&gt;
&lt;p&gt;The way I wrote it above just gets the &amp;quot;c26 values that are not null&amp;quot; but it is a very easy switch, as below:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!flatten(
  a!forEach(
    local!activeTasks,
    if(
      a!isNotNullOrEmpty(property(fv!item, &amp;quot;C26&amp;quot;, null())),
      fv!item,
      {}
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138502?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 07:35:28 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1e232356-c272-4fe4-8a89-f06b1f45669d</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;your initial question said you just want to reject the nulls for the index you have mentioned, Hence mine and Mike&amp;#39;s answers reflected.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;index(
  local!activeTasks,
  wherecontains(
    reject(
      isnull(_),
      index(local!activeTasks, &amp;quot;c26&amp;quot;, null)
    ) / Mike&amp;#39;s approach,
tointeger(local!activeTasks.c26)
),
null
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138500?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 07:31:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eaded95d-e4c8-46d6-9719-c61a1ff29d46</guid><dc:creator>venkatrea696188</dc:creator><description>&lt;p&gt;use that in where contains&lt;pre class="ui-code" data-mode="text"&gt;index(local!activeTasks, wherecontains(chaitanya&amp;#39;s code/Mike&amp;#39;s,toint(local!activetasks.c26)),null)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138499?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 07:29:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:890ed6d2-09fe-4c5e-8d95-6b3935109379</guid><dc:creator>om786</dc:creator><description>&lt;p&gt;yes i need the records which dont have the null vales at c26 column of task report.&lt;/p&gt;
&lt;p&gt;i tried the chataniya suggest but it didnt work.&lt;/p&gt;
&lt;p&gt;i want&amp;nbsp;&lt;span&gt;&amp;nbsp;list of active tasks from local!activetasks where &amp;quot;C26&amp;quot; field is not null&lt;/span&gt;&lt;/p&gt;
&lt;div style="display:none;position:absolute;"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138497?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 07:22:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:51257296-080b-4cf4-96eb-abf1ec47fb6e</guid><dc:creator>venkatrea696188</dc:creator><description>&lt;p&gt;You are already using Query analytics to show it on the grid (You got the list here), Use Chaitanya&amp;#39;s or Mike&amp;#39;s Suggestion to index only the Notnull values out of the list. Did you stuck somewhere?? You want list of active tasks from local!activetasks where &amp;quot;C26&amp;quot; field is not null??&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138488?ContentTypeID=1</link><pubDate>Tue, 23 Jul 2024 06:17:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:720cc165-f9f7-4bfe-b6e4-188222cc7824</guid><dc:creator>om786</dc:creator><description>&lt;p&gt;actully data is coming from a task report.&lt;/p&gt;
&lt;p&gt;out of which i need to filter that report data based on the value of a field&lt;/p&gt;
&lt;div style="display:none;position:absolute;"&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138465?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2024 15:47:16 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11184a66-9a4b-4589-8122-163138f59a36</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;I prefer to avoid &amp;quot;reject()&amp;quot; and the other primitive looping functions where possible (which is almost everywhere), as a!forEach() does a better job, is more flexible, and is easier to understand.&amp;nbsp; Here we iterate over an array of &amp;quot;local!activeTasks&amp;quot; (pulling out arbitrary property &amp;quot;myProperty&amp;quot; first using the &lt;em&gt;&lt;strong&gt;property&lt;/strong&gt;&lt;/em&gt;&lt;em&gt;&lt;strong&gt;()&lt;/strong&gt;&lt;/em&gt; rule, which does the same thing as &lt;em&gt;index()&lt;/em&gt; but we&amp;#39;re using the appropriate one for the job it&amp;#39;s doing here).&amp;nbsp; When any given iteration is blank, the loop returns an empty set.&amp;nbsp; (We wrap the whole thing in a!flatten() since otherwise if every iteration returns an empty set, it would give you an array of empty sets, which a!flatten() collapses to the desired single empty set).&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;a!flatten(
  a!forEach(
    property(local!activeTasks, &amp;quot;myProperty&amp;quot;, null()),
    if(
      a!isNotNullOrEmpty(fv!item),
      fv!item,
      {}
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138463?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2024 15:11:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:80c73cc1-79f2-40d2-91e6-205d8a7b4329</guid><dc:creator>Karumuru Abhishek</dc:creator><description>&lt;p&gt;hi&amp;nbsp;&lt;a href="/members/omj2851"&gt;om786&lt;/a&gt;&amp;nbsp; could you post your data subset output, please? by seeing that we could post some relevant idea/logic for it&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reject function used with index function</title><link>https://community.appian.com/thread/138457?ContentTypeID=1</link><pubDate>Mon, 22 Jul 2024 14:39:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:725693ca-8f8a-48ad-8435-5c2b3c8f36a6</guid><dc:creator>Konduru Chaitanya</dc:creator><description>&lt;p&gt;Hello&amp;nbsp;&lt;a href="/members/omj2851"&gt;om786&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is not sufficient information. Please share the more details. Here is something near to what you have asked for, but not accurate as I am not clear of what you are trying to do and what you have tried.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;reject(
  isnull(_),
  index(local!activeTasks,&amp;quot;c26&amp;quot;,null)
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>