<?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>between</title><link>https://community.appian.com/discussions/f/general/24203/between</link><description>Hi, 
 is their any other alternative to between operator? 
 bcz am querying data from db.. giving different o/p in UI 
 same query i have used to query the data from UI so</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: between</title><link>https://community.appian.com/thread/93354?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 12:28:15 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:37dfb0d2-753e-4e1f-9cac-f9b08be34e18</guid><dc:creator>Sikhi Bhamidipalli</dc:creator><description>&lt;p&gt;Try the below snippet:&lt;/p&gt;
&lt;p&gt;a!queryEntity(&lt;br /&gt; entity: cons!CR_CMU_ENTITY_DU_MONITORING,&lt;br /&gt; query: a!query(&lt;br /&gt; logicalExpression: a!queryLogicalExpression(&lt;br /&gt; operator: &amp;quot;AND&amp;quot;,&lt;br /&gt; filters: {&lt;br /&gt; a!queryFilter(&lt;br /&gt; field: &amp;quot;expiredDays_int&amp;quot;,&lt;br /&gt; operator: &amp;quot;&amp;gt;&amp;quot;,&lt;br /&gt; value: cast(&lt;br /&gt; typeof(tointeger(null)),&lt;br /&gt; rule!CR_CMU_DSC_getExpiredDaysInSecurityDocumentation(selectedItemType_txt: 1).startIndex_int&lt;br /&gt; )&lt;br /&gt; ),&lt;br /&gt; a!queryFilter(&lt;br /&gt; field: &amp;quot;expiredDays_int&amp;quot;,&lt;br /&gt; operator: &amp;quot;&amp;lt;&amp;quot;,&lt;br /&gt; value: cast(&lt;br /&gt; typeof(tointeger(null)),&lt;br /&gt; rule!CR_CMU_DSC_getExpiredDaysInSecurityDocumentation(selectedItemType_txt: 30).endIndex_int&lt;br /&gt; )&lt;br /&gt; )&lt;br /&gt; },&lt;br /&gt; ignoreFiltersWithEmptyValues: true&lt;br /&gt; ),&lt;br /&gt; pagingInfo: ri!pagingInfo&lt;br /&gt; ),&lt;br /&gt; fetchTotalCount: true()&lt;br /&gt;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;A couple of things to note here:&lt;/p&gt;
&lt;p&gt;1. Curly braces in below statement indicates it&amp;#39;s an array.&lt;/p&gt;
&lt;p&gt;value: {&lt;br /&gt; rule!CR_CMU_DSC_getExpiredDaysInSecurityDocumentation(&lt;br /&gt; selectedItemType_txt: 30&lt;br /&gt; ).endIndex_int&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;It&amp;#39;s like writing your SQL as below which obviously results in an error (Appian presents it similar to what you have in your question):&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;select * from xyz where id &amp;gt; {1}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. I have used the cast function to ensure your rule returns a scalar value but not a list.&amp;nbsp;If your rule is returning a scalar value, then you can write as below too:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;a!queryFilter(&lt;br /&gt; field: &amp;quot;expiredDays_int&amp;quot;,&lt;br /&gt; operator: &amp;quot;&amp;lt;&amp;quot;,&lt;br /&gt; value: rule!CR_CMU_DSC_getExpiredDaysInSecurityDocumentation(selectedItemType_txt: 30).endIndex_int&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: between</title><link>https://community.appian.com/thread/93352?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 11:56:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cf098641-13ec-49f6-b041-d8a634ba24c5</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Seems like the value is a list. This must be a single value.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: between</title><link>https://community.appian.com/thread/93350?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 11:32:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3f64823b-8fc7-4be9-9a65-48411023fe6c</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;&lt;span&gt;t function a!queryFilter [line 62]: Cannot apply operator [GREATER_THAN] to field [expiredDays_int] when comparing to value [TypedValue[it=101,v={1}]].&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;a!queryEntity(
  entity: cons!CR_CMU_ENTITY_DU_MONITORING,
  query: a!query(
    logicalExpression: a!queryLogicalExpression(
      operator: &amp;quot;AND&amp;quot;,
      filters: {
        a!queryFilter(
          field: &amp;quot;expiredDays_int&amp;quot;,
          operator: &amp;quot;&amp;gt;&amp;quot;,
          value: {
            rule!CR_CMU_DSC_getExpiredDaysInSecurityDocumentation(
              selectedItemType_txt: 1
            ).startIndex_int
          }
        ),
        a!queryFilter(
          field: &amp;quot;expiredDays_int&amp;quot;,
          operator: &amp;quot;&amp;lt;&amp;quot;,
          value: {
            rule!CR_CMU_DSC_getExpiredDaysInSecurityDocumentation(
              selectedItemType_txt: 30
            ).endIndex_int
          }
        )
      },
      ignoreFiltersWithEmptyValues: true
    ),
    pagingInfo: ri!pagingInfo
  ),
  fetchTotalCount: true()
)&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: between</title><link>https://community.appian.com/thread/93347?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 10:48:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ffb1ead2-3f95-47e2-af4e-dd1075bdfbcd</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Use a logical expression&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/22.1/fnc_system_a_querylogicalexpression.html"&gt;docs.appian.com/.../fnc_system_a_querylogicalexpression.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: between</title><link>https://community.appian.com/thread/93346?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 10:40:50 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:59d5fdf1-523b-4764-ac64-6c88954eb84c</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;didn&amp;#39;t get how to write that .. how can i send the two values to filter&amp;nbsp;&lt;/p&gt;
&lt;p&gt;i understood your query&amp;nbsp;&lt;/p&gt;
&lt;p&gt;select * from xyz where id&amp;gt; 1 and id&amp;lt;30 like this but how to write in appian!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: between</title><link>https://community.appian.com/thread/93345?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 10:29:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a2ce1ea8-11fd-4428-ba6a-59070bf34734</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;What is wrong with &amp;quot;between&amp;quot;?&lt;/p&gt;
&lt;p&gt;You can just combine two filters. One with a &amp;quot;&amp;gt;&amp;quot; and another with a &amp;quot;&amp;lt;&amp;quot; operator.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>