<?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>In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/discussions/f/rules/7599/in-queryentity-we-are-using-nested-condition-to-get-the-desired-data-from-the-d</link><description>In QueryEntity, we are using nested condition to get the desired data from the DB Table. However, we are getting &amp;quot;Expression evaluation error at function a!queryEntity: Cannot apply a filter with a blank field name.&amp;quot; exception during execution. Without</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/114712?ContentTypeID=1</link><pubDate>Wed, 21 Jun 2023 14:32:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0f827a9d-e2b9-4d1e-a1cb-bd90c597b48e</guid><dc:creator>samarm0001</dc:creator><description>&lt;p&gt;Thanks, it helped.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/64790?ContentTypeID=1</link><pubDate>Thu, 21 Feb 2019 15:20:00 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:11e54d78-076f-4e28-8d36-59f25fe1a005</guid><dc:creator>auxeeliyaj0001</dc:creator><description>i&amp;#39;m new to Appian. I have an issue with expression rule. my rule is as follows:&lt;br /&gt;
&lt;br /&gt;
a!queryEntity(&lt;br /&gt;
    entity: cons!LCW_BUSINESS_UNIT_ENTITY,&lt;br /&gt;
    query: a!query(&lt;br /&gt;
      filter: if(&lt;br /&gt;
        rule!APN_isEmpty(ri!businessDivision.id),&lt;br /&gt;
        {},&lt;br /&gt;
        a!queryFilter(&lt;br /&gt;
          field: &amp;quot;businessDivision.id&amp;quot;, &lt;br /&gt;
          operator: &amp;quot;=&amp;quot;, &lt;br /&gt;
          value: ri!businessDivision.id)&lt;br /&gt;
      ),&lt;br /&gt;
      pagingInfo: a!pagingInfo(&lt;br /&gt;
        startIndex: 1, &lt;br /&gt;
        batchSize: -1, &lt;br /&gt;
        sort: a!sortInfo(&lt;br /&gt;
          field: &amp;quot;order&amp;quot;, &lt;br /&gt;
          ascending: true&lt;br /&gt;
          )&lt;br /&gt;
        )&lt;br /&gt;
    ),&lt;br /&gt;
    fetchTotalCount: true&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
but when i execute this i get the following error&lt;br /&gt;
&lt;br /&gt;
Expression evaluation error at function a!queryEntity: Cannot apply a filter with a blank field name.&lt;br /&gt;
&lt;br /&gt;
can you pls help?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31191?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 23:02:51 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:4b8d2cb1-fa73-4d65-8870-f92ca88cdadb</guid><dc:creator>Sidhant Behura</dc:creator><description>@karthikeyans75 - No problem ... Happy to help...&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31159?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 22:08:27 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0c89fa04-4ac2-4015-8295-d3e85f0dc887</guid><dc:creator>Pavan</dc:creator><description>@ kartikeyan Great to hear :)&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31148?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 20:55:53 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2bbc8a9d-cd34-4fe5-81c8-a4e38929599a</guid><dc:creator>Karthik</dc:creator><description>@sidhantb/Pavang, Yep, got that. The new code is working. Thanks &lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31141?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 14:06:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:754ecf92-e63a-4b1c-b1be-af419ba99b2a</guid><dc:creator>Pavan</dc:creator><description>@karthikeyan in the attached code under querylogicalExpression and in under filters part you have written the logicalExpression part inside which is not acceptable as per syntax. I have removed that code under filters part and placed it under logicalexpression part and attaching the snippets for comparsion. &lt;br /&gt;&lt;br /&gt;And what sikhi said is correct actually, we don't need it but we had the same issue in one case. So suggested to do the same. Hope it will help.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31140?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 14:02:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2f8fc461-2e2c-4135-b334-a74659727e7e</guid><dc:creator>Sidhant Behura</dc:creator><description>@karthikeyans75 - There is a small syntactical error. In the a!queryLogicalExpression, you have "filters" and inside that you have included "logicalExpressions" which is not correct. Both should be separate. Please refer the updated code snippet.&lt;br /&gt;&lt;br /&gt;Please refer the link below link for more information.&lt;br /&gt;https://forum.appian.com/suite/help/16.1/System_Functions.html#a!queryLogicalExpression.28.29&lt;br /&gt;&lt;br /&gt;Hope the information is helpful.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31139?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 13:21:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:6343a7d3-bdd7-44b1-9d08-4d3c4ed4e511</guid><dc:creator>shivakanthr</dc:creator><description>@Karthikeyan Hi, &lt;br /&gt;I have updated your code slightly and attached, Try with this code and let me know if there are any issues,&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/15/QueryEntity_5F00_Updated.txt"&gt;QueryEntity_Updated.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31135?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 12:24:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2ddb1a79-7f7b-4227-946e-8ec76d809445</guid><dc:creator>Karthik</dc:creator><description>@sikhivahans, thanks for the refactoring. The new code gives the same error too &lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31134?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 12:22:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e929650f-2e48-4356-9041-d5bdefbec64e</guid><dc:creator>Karthik</dc:creator><description>@mohanp, I added naics col too, it didnt work. The same query works fine when I take off the nested condition&lt;br /&gt;&lt;br /&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31133?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 12:07:02 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ee245fa5-1b7c-476c-91f8-ab3265a3d5b5</guid><dc:creator>sikhivahans</dc:creator><description>@pavang If you meant to say that a column should be queried in order to apply filter on it, just to let you know, to the best of my knowledge, that's not correct. You can still apply the filter on a column though it's not retrieved. (Reference: https://forum.appian.com/suite/help/16.1/Query_Recipes.html#Retrieve_the_Data_for_a_Single_Field. The 'id' column isn't being retrieved, yet it's used as filter.)&lt;br /&gt;&lt;br /&gt;In short, there isn't a need to retrieve 'naics' just because of the reason that a filter is applied on it.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31132?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 11:53:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e4f8dc8b-8a5c-4b9a-b5ef-f72b457b1811</guid><dc:creator>Pavan</dc:creator><description>@mohanp In addition to the above comments in the attached snippet code, you are applying the filter based on one column named &amp;quot;naics&amp;quot;, but you are not querying the that column. Try to query that required one and check it. Hope it will work.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31131?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 11:52:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:16646a5c-25d5-4b02-a16e-e72481248182</guid><dc:creator>sikhivahans</dc:creator><description>@karthikeyans Hi, I have refactored your code slightly(as per my knowledge, I felt the need of doing so) and it would be worth testing the attached code snippet and letting us know if there are any issues still.&lt;br /&gt;&lt;p&gt;&lt;a href="/cfs-filesystemfile/__key/communityserver-discussions-components-files/15/QueryEntity_5F00_Modified.txt"&gt;QueryEntity_Modified.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31130?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 11:48:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:32586a81-199f-4582-bfd9-289f5cdc2948</guid><dc:creator>mohanp</dc:creator><description>Ahh Thanks Sikhivahan. I missed that.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31129?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 11:43:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9939cb1b-9014-4978-b5b7-206e569f928c</guid><dc:creator>sikhivahans</dc:creator><description>@mohanp If you are talking about the 'id' filter in the code snippet, just to let you know, the 'value' parameter is optional when 'not null' is applied as filter(Reference: https://forum.appian.com/suite/help/16.1/Appian_Data_Types.html#QueryFilter). So that may not be a issue at all.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: In QueryEntity, we are using nested condition to get the desired data from the D</title><link>https://community.appian.com/thread/31127?ContentTypeID=1</link><pubDate>Mon, 16 May 2016 11:38:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:88da75ab-f2f9-4054-9780-c83a52e4437d</guid><dc:creator>mohanp</dc:creator><description>Notice line no 32, it seems you missed to pass value parameter to queryFilter.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>