<?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>Expression rules</title><link>https://community.appian.com/discussions/f/rules/14408/expression-rules</link><description>I have an issue with expression rule. my rule is as follows: a!queryEntity( entity: cons!LCW_BUSINESS_UNIT_ENTITY, query: a!query( filter: if( rule!APN_isEmpty(ri!businessDivision.id), {}, a!queryFilter( field: &amp;quot;businessDivision.id&amp;quot;, operator: &amp;quot;=&amp;quot;, value</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/73286?ContentTypeID=1</link><pubDate>Sun, 12 Apr 2020 15:59:23 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:81390acb-7615-4125-a537-5558f1b0e8a4</guid><dc:creator>arunramanathtm</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;@Mike for your information.&lt;/p&gt;
&lt;p&gt;But I believe suggesting answers will&amp;nbsp;help people in future who come up here with such basic doubts.&lt;/p&gt;
&lt;p&gt;Discussions with &lt;em&gt;suggested answer&lt;/em&gt; tag can help people to search discussions and solutions quickly&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/73285?ContentTypeID=1</link><pubDate>Sun, 12 Apr 2020 15:30:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:81256517-b1bf-42ad-89cb-a79a2e93c4bd</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Just as an FYI, it&amp;#39;s probably not very useful to post new replies on these old &amp;quot;zombie&amp;quot; threads (those over 1 year old, or even over a few months old in most cases), as the issues are most likely long since resolved or irrelevant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/73284?ContentTypeID=1</link><pubDate>Sun, 12 Apr 2020 14:30:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:221a6c29-ddc5-40ae-ba09-cfcd57aa8f25</guid><dc:creator>arunramanathtm</dc:creator><description>&lt;p&gt;Rewrite the code so that you are not executing the query when&amp;nbsp;value provided to filter field is empty.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/65588?ContentTypeID=1</link><pubDate>Wed, 03 Apr 2019 01:36:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:25055727-3f71-462b-adf1-3599a9a1379e</guid><dc:creator>aloks0189</dc:creator><description>&lt;p&gt;By any chance, is it possible for you to attach the screenshot of your CDT structure and the sample response data, because i suspect on it&amp;#39;s field name as well as it&amp;#39;s value.&lt;/p&gt;
&lt;p&gt;If you can share these details, will help the practitioner to identify the root cause and provide you the resolution to overcome this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/65585?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2019 17:38:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4e5098cc-8365-4678-9a5e-62dc4fe4d0b2</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Please supply us with some more details.&lt;/p&gt;
&lt;p&gt;First, it would help to see the structure of the CDT for ri!businessDivison.&lt;/p&gt;
&lt;p&gt;Second, I would like you to please run the following modified query and paste the output here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!queryEntity(
  entity: cons!LCW_BUSINESS_UNIT_ENTITY,
  query: a!query(
    pagingInfo: a!pagingInfo(
      startIndex: 1,
      batchSize: 1
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/65584?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2019 16:49:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fadabd11-8edd-4ebe-8784-fa9d75d87352</guid><dc:creator>sandraalejandrac0001</dc:creator><description>&lt;p&gt;I tried to made a filter with&amp;nbsp;a!pickerFieldCustom component.&lt;/p&gt;
&lt;p&gt;The value that I get from this component, I want to put it as a Filter Value for the a!queryEntity and made the filter directly to the a!gridField, but this error appear:&amp;nbsp;Cannot apply a filter with a blank field name&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/65576?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2019 14:55:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0a22f8df-c57c-4f9e-8af2-3efe5a715d55</guid><dc:creator>Krishna Chaitanya Mallavarapu</dc:creator><description>&lt;p&gt;In&amp;nbsp;&lt;span&gt;query Filter&amp;nbsp;in filed mention actual filed like&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;a!queryFilter(&lt;br /&gt; &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;field: &amp;quot;businessDivision&amp;quot;,&lt;/strong&gt; &lt;/span&gt;&lt;br /&gt; operator: &amp;quot;=&amp;quot;, &lt;br /&gt; value: ri!businessDivision.id)&lt;br /&gt; )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;your filed name in cdt&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;a!queryEntity(&lt;br /&gt; entity: cons!LCW_BUSINESS_UNIT_ENTITY,&lt;br /&gt; query: a!query(&lt;br /&gt; filter: if(&lt;br /&gt; rule!APN_isEmpty(&lt;br /&gt; ri!businessDivision.id&lt;br /&gt; ),&lt;br /&gt; null,&lt;br /&gt; a!queryFilter(&lt;br /&gt; field: &amp;quot;businessDivision&amp;quot;,&lt;br /&gt; operator: &amp;quot;=&amp;quot;,&lt;br /&gt; value: ri!businessDivision.id&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; pagingInfo: a!pagingInfo(&lt;br /&gt; startIndex: 1,&lt;br /&gt; batchSize: - 1,&lt;br /&gt; sort: a!sortInfo(&lt;br /&gt; field: &amp;quot;order&amp;quot;,&lt;br /&gt; ascending: true&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; fetchTotalCount: true&lt;br /&gt;)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/65574?ContentTypeID=1</link><pubDate>Tue, 02 Apr 2019 14:47:20 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3261e7da-991f-42ff-8c78-37ca8be6c038</guid><dc:creator>sandraalejandrac0001</dc:creator><description>&lt;p&gt;Hi Vinay.&lt;/p&gt;
&lt;p&gt;I got the same error above this conversations, and I try to implement your code but It doesn&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I tried to filter a field from a datagrid using this similar code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/64804?ContentTypeID=1</link><pubDate>Fri, 22 Feb 2019 07:14:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:67340bb9-77c5-4074-8cbb-82e52b5f4b5c</guid><dc:creator>Vinay Kumar Rai</dc:creator><description>Hi,&lt;br /&gt;
&lt;br /&gt;
The error occur because the parameter ri!businessDivision.id is null.&lt;br /&gt;
Your filter condition is incorrectly placed, try this&lt;br /&gt;
&lt;br /&gt;
if(&lt;br /&gt;
rule!APN_isEmpty(ri!businessDivision.id),&lt;br /&gt;
{},&lt;br /&gt;
&amp;lt;query entity&amp;gt;&lt;br /&gt;
)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/64794?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 16:24:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:00f65635-39e2-4936-a666-40ffb79f6dfb</guid><dc:creator>auxeeliyaj0001</dc:creator><description>hi Ashvin, thanks for the reply. My task is to create cascading dropdowns. for that i have created foreign key relationships in the CDTs. so for the second dropdown to pop up, i try to take the selected choice of the first dropdown. Hence i use businessDivision.id.   basically i have like businessDivision--&amp;gt;businessUnit--&amp;gt;businessLine.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression rules</title><link>https://community.appian.com/thread/64793?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 16:20:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:85b697a8-38b5-41b1-8c48-fe8ff2e2b51f</guid><dc:creator>Ashvin Kapur</dc:creator><description>Not sure how your CDT is set up, but my guess is that the field parameter should be &amp;quot;id&amp;quot; instead of &amp;quot;businessDivision.id&amp;quot; in your query filter.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>