<?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 Rule</title><link>https://community.appian.com/discussions/f/general/21863/expression-rule</link><description>Hi All want to create Ann expression Rule to check weather the array of values say rollnumber with the column field in the database . 
 Condition 
 If 2 value passed and one is there and another is not there then i don&amp;#39;t want user to continued</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Expression Rule</title><link>https://community.appian.com/thread/85674?ContentTypeID=1</link><pubDate>Sat, 11 Sep 2021 14:43:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8fdb2057-1e15-4b88-970d-550826daa68a</guid><dc:creator>vimalkumars</dc:creator><description>&lt;p&gt;Use the below expression&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;  if(
    local!dataSet.totalCount = 0,
    true, /*continue*/
    false, /*Restricted */
  )&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression Rule</title><link>https://community.appian.com/thread/85673?ContentTypeID=1</link><pubDate>Sat, 11 Sep 2021 01:51:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8fbd72f9-38c3-4419-9f5c-a2e151849e12</guid><dc:creator>saurabh sharma</dc:creator><description>&lt;p&gt;What if one is present and another is not present . &lt;/p&gt;
&lt;p&gt;If a user is entering two at a same time . If both are present then it should be restricted and if only one &amp;nbsp;is present and another not then also it should be restricted and if both are not present then it should continue &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Expression Rule</title><link>https://community.appian.com/thread/85669?ContentTypeID=1</link><pubDate>Fri, 10 Sep 2021 19:11:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:18e538cc-d0e7-4123-b39b-e65c27cb411f</guid><dc:creator>vimalkumars</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you looking for an expression to check if RollNumber1 and RollNumber2 both exist in the database?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!dataSet: a!queryEntity(
    entity: &amp;quot;&amp;lt; DSE_Constant &amp;gt;&amp;quot;,
    query: a!query(
      logicalExpression: a!queryLogicalExpression(
        operator: &amp;quot;AND&amp;quot;,
        filters: {
          a!queryFilter(
            field: &amp;quot;rollnumber&amp;quot;,
            operator: &amp;quot;in&amp;quot;,
            value: { &amp;quot;AB000&amp;quot;, &amp;quot;AB0001&amp;quot; }
          )
        },
        ignoreFiltersWithEmptyValues: true
      ),
      pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 50)
    ),
    fetchTotalCount: true
  ),
  if(
    local!dataSet.totalCount = length({ &amp;quot;AB000&amp;quot;, &amp;quot;AB0001&amp;quot; }),
    &amp;quot;All Values Present&amp;quot;,
    if(
      local!dataSet.totalCount &amp;gt;= 1,
      &amp;quot;Partially Present&amp;quot;,
      &amp;quot;Not Present&amp;quot;
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>