<?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>Null value in Array</title><link>https://community.appian.com/discussions/f/rules/8977/null-value-in-array</link><description>Hi All, Can any one help me in how to check a null value in an Array? , isNull(ri!abc), where abc is an Array. which not working as we expecting . Quick response will be appriciated. OriginalPostID-250480</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39980?ContentTypeID=1</link><pubDate>Mon, 05 Dec 2016 20:53:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:de3ad8a4-9dc4-41bf-93b3-95d79126c5e1</guid><dc:creator>davids735</dc:creator><description>wherecontains(null, ri!yourArray) will return the locations of all the nulls as a list of integers.  You can place this inside the index() function to then apply more logic to the results&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39953?ContentTypeID=1</link><pubDate>Sat, 03 Dec 2016 17:42:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:684868d0-297b-4b23-ac3d-9fad15265fcf</guid><dc:creator>chetany</dc:creator><description>If you want to just check if  the array variable is itself null or Empty, you can use: &lt;br /&gt;or(local!myarray=&amp;quot;&amp;quot;, length(local!myarray)=0).  This will work for any type of primitive array.&lt;br /&gt;&lt;br /&gt;If your array has few elements which are null, you can also  use the reject function.&lt;br /&gt;Example: reject(fn!isnull, {1,3,2,null, 5}) . This will return {1,3,2,5}&lt;br /&gt;&lt;br /&gt;isnull() does not work on arrays as expected as  you observed - the reason is that sometimes an array maybe  empty but not null, When an array is empty isnull() will return false. And it is common in SAIL UI to set array variables to null or empty list.&lt;br /&gt;Either may happen, but in both the cases the isnull() behaves differently. It will be false for empty list, but true when it is actually null.&lt;br /&gt;So, its better to avoid using isnull to check for nullability  of array variables.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39951?ContentTypeID=1</link><pubDate>Sat, 03 Dec 2016 15:24:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:db60b636-9ceb-46dc-9458-78dbc6b3ba0c</guid><dc:creator>rohandhondilalk</dc:creator><description>@chandrasekharg, @rishub, @mschmitt,  @sparshs, @sikhivahans : Thank you all for the response .&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39950?ContentTypeID=1</link><pubDate>Sat, 03 Dec 2016 15:23:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:62c4d799-c1eb-48b5-aee5-dd19341b4669</guid><dc:creator>rohandhondilalk</dc:creator><description>Hi ramanjaneyulut, Thanks !!. It worked . :)&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39949?ContentTypeID=1</link><pubDate>Sat, 03 Dec 2016 14:20:10 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8fdce605-c727-4006-aa0a-070d651a5c60</guid><dc:creator>rohandhondilalk</dc:creator><description>@sikhivahans, we had applied and it was working at run time. When we had implemented the same in the designer mode, it was not working as expected.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39947?ContentTypeID=1</link><pubDate>Sat, 03 Dec 2016 10:29:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0b850e5f-5388-4f5d-b10c-f7f656fa94fe</guid><dc:creator>chandu</dc:creator><description>if you want just to have true or false for null value in array can&amp;#39;t we use &lt;br /&gt; any(fn!isnull,arrray)?&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39941?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2016 21:53:38 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1ee5c73a-7dc0-4251-b7b1-19436a2e0124</guid><dc:creator>Rama Thummala</dc:creator><description>You can check by using below code....&lt;br /&gt;if(or(isnull(ri!array),length(ri!array)=0),true statements, false statements )&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39938?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2016 20:30:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b340db16-a015-4b75-b67c-c2a8411672db</guid><dc:creator>sparshs</dc:creator><description>you can do like this if(OR(rule!APN_isEmpty(ri!array),length(ri!array)=0)).&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39935?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2016 19:36:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:84fb460f-52a5-443f-9399-cb5bf08a964d</guid><dc:creator>Mike Schmitt</dc:creator><description>In case you mean you want to find a null value in an array of other data, you can use a combination of where() and apply(), as in the following example code:&lt;br /&gt;&lt;br /&gt;with(&lt;br /&gt;  array: {&amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, null(), &amp;quot;d&amp;quot;},&lt;br /&gt;  &lt;br /&gt;  where(&lt;br /&gt;    apply(fn!isnull, array)&lt;br /&gt;  )&lt;br /&gt;)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39933?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2016 17:54:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2633e668-5dd7-4ec2-8f14-05681c41a656</guid><dc:creator>sikhivahans</dc:creator><description>@rohandhondilalk Maybe worth applying a length(ri!array)=0 as secondary level check?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Null value in Array</title><link>https://community.appian.com/thread/39932?ContentTypeID=1</link><pubDate>Fri, 02 Dec 2016 17:51:54 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:76b4eddb-1006-482e-80f1-9d0761799004</guid><dc:creator>rishub</dc:creator><description>please Try rule!APN_isEmpty&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>