<?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>query rule</title><link>https://community.appian.com/discussions/f/rules/25297/query-rule</link><description>Hi 
 
 how can i write above query in ER? 
 can anyone help me with this? 
 i have tried but it gives error</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: query rule</title><link>https://community.appian.com/thread/98328?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 10:03:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5685f5b2-d956-450d-a736-f92aeb6ba5a6</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;Exactly. You need to implement a code logically and also need to understand how to deal with that code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98326?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 09:29:24 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:32897196-41c2-443c-8f8c-64e19634500b</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I can&amp;#39;t really help with this.&lt;/p&gt;
&lt;p&gt;When I approach stuff I have a hard time understanding, I try to do small steps, test and validate each step and try to understand what is going on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98325?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 09:29:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:812712c3-117a-4500-b09a-40e7c57ad697</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;Then you can give 3 input and the filters for the same.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98324?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 09:22:03 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5465a11d-aa98-4d13-98d9-b391a850f6ba</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;even&amp;nbsp; i have checked this also.. this give wrong data&amp;nbsp;&lt;/p&gt;
&lt;p&gt;if i don&amp;#39;t apply the filters like GCIF=LIBAILITY and LIABILITY=CIF filter there might be chances of LIABILITY value will have different&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;for ex when i apply&amp;nbsp;&lt;span&gt;&amp;nbsp;GCIF=LIBAILITY and LIABILITY=CIF filter then output will be&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;GCIF=102646 and LIABILITY=102646 and CIF=102646&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;when i don&amp;#39;t apply&amp;nbsp;&amp;nbsp;GCIF=LIBAILITY and LIABILITY=CIF this filter and apply only&amp;nbsp;&amp;nbsp;GCIF=CIF then output will be&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;GCIF=102646 and LIABILITY=735838 and CIF=102646&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;in this case how to overcome&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98314?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:41:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:530f935d-8bc4-4435-8b47-71ba231d2563</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;It seems like the fields do not match. And when you configure it to ignore any filter having no values, then pass no value, this filter will be ignored and you get more items than expected.&lt;/p&gt;
&lt;p&gt;Make sure to use the right rule inputs for each field and either pass values or switch off &amp;quot;ignoreFiltersWithEmptyValues&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1658738386376v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98311?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:26:35 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:65bca4d4-7168-4ff6-8ce7-8466ee731bdc</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;For reference:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/640x480/__key/communityserver-discussions-components-files/15/pastedimage1658737625223v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98310?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:25:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:95970a47-576e-4df1-9be4-3763d3499eb9</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;in the screenshot, GCIF,Liability_Number and CIF is same for all. Then please use the below expression for the querylogicalExpression.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note: you have to change the&amp;nbsp;field&amp;nbsp;name(GCIF, CIF_TYPE) in the code. for the please refer your cdt. Rule input GCIF is of integer type.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;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;GCIF&amp;quot;,&lt;br /&gt; operator: &amp;quot;=&amp;quot;,&lt;br /&gt; value: ri!gcif&lt;br /&gt; ),&lt;br /&gt; a!queryFilter(&lt;br /&gt; field: &amp;quot;CIF_TYPE&amp;quot;,&lt;br /&gt; operator: &amp;quot;=&amp;quot;,&lt;br /&gt; value:&amp;quot;Parent&amp;quot;&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98308?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:17:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:d99adce8-84ba-4c1d-a276-77d936c54eab</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;and this will give me all the rows in this i have to filter it&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98307?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:15:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:a12e9b1f-6109-4b37-b700-aebbfe34a2d9</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1658736868055v1.png" alt=" " /&gt; this is how i get data from that query&lt;/p&gt;
&lt;p&gt;so in this data i&amp;#39;ll give one gcif data and will get only that row&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1658736951781v2.png" alt=" " /&gt; this is what i required from ER&lt;/p&gt;
&lt;p&gt;so i have used 2 gicfs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98305?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:09:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:323fda5d-6046-4dc1-9bd3-5dede66cb52c</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;I have taken a look and that is what I am suggesting.&amp;nbsp;&lt;br /&gt;You have configured it incorrectly. Please take a look the screenshots above and try the suggested approach.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98304?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:08:39 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c4e15bd9-d0e2-4834-884c-baf8eac5177f</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;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;GCIF&amp;quot;,&lt;br /&gt; operator: &amp;quot;=&amp;quot;,&lt;br /&gt; value: ri!gcif&lt;br /&gt; ),&lt;br /&gt; a!queryFilter(&lt;br /&gt; field: &amp;quot;LIABILITY_NUMBER&amp;quot;,&lt;br /&gt; operator: &amp;quot;=&amp;quot;,&lt;br /&gt; value: ri!liabilityNumber&lt;br /&gt; ),&lt;br /&gt; a!queryFilter(&lt;br /&gt; field: &amp;quot;CIF_TYPE&amp;quot;,&lt;br /&gt; operator: &amp;quot;=&amp;quot;,&lt;br /&gt; value:&amp;quot;Parent&amp;quot;&lt;br /&gt; )&lt;br /&gt; }&lt;br /&gt;)&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;please replace your code with the above one and add two rule input variables 1) gcif number(integer) 2) liabilityNumber number(integer). I am not sure why you took GCIF 2 times in where conditions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98303?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:06:14 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b4fdda18-380a-4111-96bc-df8cc6186425</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;all are integer - gcif, cif, liability_number&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98302?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:05:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cfde5243-52c0-4c49-b2b7-932b511e0473</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;what is the datatype for GCIF and Liability_Number?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98301?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:02:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:beefe643-67ee-4dd4-a7fa-d77b9cd782cd</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1658736137172v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;can you please look into this query and let me know&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98300?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 08:02:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8128a67e-d5ca-423d-bda3-30dfb062deae</guid><dc:creator>deepakg681722</dc:creator><description>&lt;p&gt;In the picture, you enter the data into groupCIF_int variable but you are not using it anywhere.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98299?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 07:59:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:233717b0-7838-4153-872a-f1e342229a24</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;You have exchanged the CIF and liability number fields. Please check..&lt;br /&gt;Rest, the code looks fine and should work. Can you also include the values that you are passing in your RI in the screenshot?&lt;br /&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1658736817375v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98298?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 07:56:12 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb445141-ea99-4293-a206-63eb308322a1</guid><dc:creator>KM</dc:creator><description>&lt;p&gt;i have tried with that also&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1658735778200v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;when i given ri it is not filtering all data it is giving&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;so can you please let me know&amp;nbsp;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/15/pastedimage1658735942863v1.png" alt=" " /&gt; how can i write ER for this query&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: query rule</title><link>https://community.appian.com/thread/98297?ContentTypeID=1</link><pubDate>Mon, 25 Jul 2022 07:54:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f2741484-585d-4cfd-a44a-e3612211b7ff</guid><dc:creator>Harshit Bumb (Appyzie)</dc:creator><description>&lt;p&gt;In the &amp;quot;Value&amp;quot; field, you need to remove the double quotes and add ri! instead.&amp;nbsp;&lt;br /&gt;What you have done right now is you are comparing an Integer field (groupCif_int) with a string (&amp;quot;liabilityNumber_int&amp;quot;). So instead of&amp;nbsp;&lt;span&gt;&amp;quot;liabilityNumber_int&amp;quot; it should be ri!liabilityNumber_int&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>