<?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>Check row existence in database using expression rule</title><link>https://community.appian.com/discussions/f/rules/14389/check-row-existence-in-database-using-expression-rule</link><description>Hi, 
 I am using an expression rule with parameters/filters to fetch data. When we have unmatched filters it is breaking the interface. I am using the below 2 expression rule to fill my drop downs which are cascading in nature. Choice values are concatenated</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Check row existence in database using expression rule</title><link>https://community.appian.com/thread/64744?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 08:09:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c2c48c69-ad69-4e57-b090-a213edd3d3b6</guid><dc:creator>mpatram</dc:creator><description>Thanks a lot amanit, it worked for me. super!&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Check row existence in database using expression rule</title><link>https://community.appian.com/thread/64742?ContentTypeID=1</link><pubDate>Tue, 19 Feb 2019 07:57:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0406befb-ea12-4786-83ca-b4dcf0c572e9</guid><dc:creator>amanit</dc:creator><description>Please try with below snippet. This should work.&lt;br /&gt;
&lt;br /&gt;
choiceLabels: {&lt;br /&gt;
  union(&lt;br /&gt;
    union(&lt;br /&gt;
      index(&lt;br /&gt;
        rule!retrieveSubProgram(&lt;br /&gt;
          &amp;quot;ABC&amp;quot;,&lt;br /&gt;
          &amp;quot;value from dd1&amp;quot;&lt;br /&gt;
        ).data,&lt;br /&gt;
        &amp;quot;subProgram&amp;quot;,&lt;br /&gt;
        null&lt;br /&gt;
      ),&lt;br /&gt;
      index(&lt;br /&gt;
        rule!retrieveSubProgram(&lt;br /&gt;
          &amp;quot;ABC&amp;quot;,&lt;br /&gt;
          &amp;quot;value from dd1&amp;quot;&lt;br /&gt;
        ).data,&lt;br /&gt;
        &amp;quot;subProgram&amp;quot;,&lt;br /&gt;
        null&lt;br /&gt;
      )&lt;br /&gt;
    ),&lt;br /&gt;
    cast(&lt;br /&gt;
      type!List,&lt;br /&gt;
      &amp;quot;New Sub Program&amp;quot;&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
},&lt;br /&gt;
choiceValues: {&lt;br /&gt;
  union(&lt;br /&gt;
    union(&lt;br /&gt;
      index(&lt;br /&gt;
        rule!retrieveSubProgram(&lt;br /&gt;
          &amp;quot;ABC&amp;quot;,&lt;br /&gt;
          &amp;quot;value from dd1&amp;quot;&lt;br /&gt;
        ).data,&lt;br /&gt;
        &amp;quot;subProgram&amp;quot;,&lt;br /&gt;
        null&lt;br /&gt;
      ),&lt;br /&gt;
      index(&lt;br /&gt;
        rule!retrieveSubProgram(&lt;br /&gt;
          &amp;quot;ABC&amp;quot;,&lt;br /&gt;
          &amp;quot;value from dd1&amp;quot;&lt;br /&gt;
        ).data,&lt;br /&gt;
        &amp;quot;subProgram&amp;quot;,&lt;br /&gt;
        null&lt;br /&gt;
      )&lt;br /&gt;
    ),&lt;br /&gt;
    cast(&lt;br /&gt;
      type!List,&lt;br /&gt;
      &amp;quot;New Sub Program&amp;quot;&lt;br /&gt;
    )&lt;br /&gt;
  )&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
And you can try testing the specific expression rule by opening it in design mode and pass values(which will have row count as zero) to it.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>