<?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>Hi all,  I&amp;#39;m having a bit of a problem with an expression I wrote.</title><link>https://community.appian.com/discussions/f/rules/2117/hi-all-i-m-having-a-bit-of-a-problem-with-an-expression-i-wrote</link><description>Hi all, I&amp;#39;m having a bit of a problem with an expression I wrote. The code is as follows: if(rule!Utils_CheckIsNULLText(ri!PreferredProvider),ri!P_Values,if( rule!getProviderByName(ri!PreferredProvider).IsActive=false(),insert(ri!P_Values,ri!PreferredProvider</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hi all,&lt;br /&gt;&lt;br /&gt;I'm having a bit of a problem with an expression I wrote.</title><link>https://community.appian.com/thread/7517?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2014 13:15:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0cb618a8-fa3e-4df6-869c-1ea619d3a77f</guid><dc:creator>caz</dc:creator><description>Hi, getting the first index of the query rule&amp;#39;s output has totally solved my problem, thanks so much!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi all,&lt;br /&gt;&lt;br /&gt;I'm having a bit of a problem with an expression I wrote.</title><link>https://community.appian.com/thread/7506?ContentTypeID=1</link><pubDate>Fri, 14 Feb 2014 09:51:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fde3d2cd-3245-4c45-a7e5-9090d2dca457</guid><dc:creator>hemalathat</dc:creator><description>You can check couple of things in your expression.&lt;br /&gt;1) Check whether the pv that is used to store the result is multiple.&lt;br /&gt;2) I assume that the rule!getProviderByName is Query rule. In that case, there may be a chance of getting null as well as multiple result. So it is better to add null check for that rule. If the result is not empty, please pick any specific index value from the result and then compare that with the Boolean.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>