<?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>logicalExpression within logicalExpression</title><link>https://community.appian.com/discussions/f/rules/24093/logicalexpression-within-logicalexpression</link><description>Hi! 
 I&amp;#39;m trying to put logicalExpression within logicalExpression ( one of them will be with operator &amp;quot;AND&amp;quot; and the other one &amp;quot;OR&amp;quot;) 
 and I dont know how to write it. 
 Where should I put the logicalExpression with the &amp;quot;AND&amp;quot; operator? for simplify it</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: logicalExpression within logicalExpression</title><link>https://community.appian.com/thread/92899?ContentTypeID=1</link><pubDate>Tue, 29 Mar 2022 06:26:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:87d27292-614d-4bd7-a3da-5fcf430dbc9e</guid><dc:creator>Avishagmo</dc:creator><description>&lt;p&gt;Thank you very much!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: logicalExpression within logicalExpression</title><link>https://community.appian.com/thread/92874?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 19:03:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7657f4bd-9067-4685-a876-836d1e30ccb5</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;Stewart didn&amp;#39;t specifically add the AND operator at the top level, but that&amp;#39;s essentially what&amp;#39;s happening in his example. Here&amp;#39;s an example with some more filters so you can see how it works:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!queryLogicalExpression(
  operator: &amp;quot;AND&amp;quot;,
  logicalexpressions: {
    a!queryLogicalExpression(
      operator: &amp;quot;AND&amp;quot;,
      filters: {
        a!queryFilter(
          field: &amp;quot;isActive&amp;quot;,
          operator: &amp;quot;=&amp;quot;,
          value: true
        ),
        a!queryFilter(
          field: &amp;quot;status&amp;quot;,
          operator: &amp;quot;&amp;lt;&amp;gt;&amp;quot;,
          value: &amp;quot;Complete&amp;quot;
        )
      }
    ),
    a!queryLogicalExpression(
      operator: &amp;quot;OR&amp;quot;,
      filters: {
        a!queryFilter(
          field: &amp;quot;type&amp;quot;,
          operator: &amp;quot;=&amp;quot;,
          value: &amp;quot;Top&amp;quot;
        ),
        a!queryFilter(
          field: &amp;quot;region&amp;quot;,
          operator: &amp;quot;=&amp;quot;,
          value: &amp;quot;West&amp;quot;
        )
      }
    )
  }
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: logicalExpression within logicalExpression</title><link>https://community.appian.com/thread/92848?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 09:21:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9b10e2a8-94e7-4935-997d-797b47092163</guid><dc:creator>Avishagmo</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the quick response!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I did not understand how this query represent&amp;nbsp;logicalExpression within&amp;nbsp;logicalExpression.&lt;/p&gt;
&lt;p&gt;I meant that the&amp;nbsp;logicalExpression &amp;quot;OR&amp;quot; will be inside the&amp;nbsp;logicalExpression &amp;quot;AND&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you verify?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: logicalExpression within logicalExpression</title><link>https://community.appian.com/thread/92847?ContentTypeID=1</link><pubDate>Mon, 28 Mar 2022 08:55:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:95c54c38-5ec9-4f9a-9804-9c864f1327cd</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;You can use the logicalExpressions attribute (note the plural) - this can take an array:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!queryEntity(
  query: a!queryLogicalExpression(
    logicalexpressions: {
      a!queryLogicalExpression(
        operator: &amp;quot;AND&amp;quot;
      ),
      a!queryLogicalExpression(
        operator: &amp;quot;OR&amp;quot;
      )
    }
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>