<?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>Unable to fetch data using query entity</title><link>https://community.appian.com/discussions/f/rules/18176/unable-to-fetch-data-using-query-entity</link><description>I am trying to fetch the data using intital values from the search 
 Ex. If Package ID is 10825 then I can type 10 or 25 etc. and should get complete list of package id containing those numbers displayed in search result 
 i tried using IN and INCLUDES</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Unable to fetch data using query entity</title><link>https://community.appian.com/thread/71522?ContentTypeID=1</link><pubDate>Mon, 20 Jan 2020 11:00:19 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:0e70e479-b365-4888-92d8-20f3c30e02f4</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;Correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to fetch data using query entity</title><link>https://community.appian.com/thread/71520?ContentTypeID=1</link><pubDate>Mon, 20 Jan 2020 05:36:33 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:851ff6ae-0976-471f-8f43-1101f9063657</guid><dc:creator>Ashwin </dc:creator><description>&lt;p&gt;So as per my understanding you are suggesting that we have to use includes function to get the expected result by adding a column in DB which would be of type text and a replica of the package id which is int&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to fetch data using query entity</title><link>https://community.appian.com/thread/71505?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 12:47:01 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:eab52bad-2626-47b2-b528-9d7a33535570</guid><dc:creator>Mike Schmitt</dc:creator><description>[quote userid="36948" url="~/discussions/f/rules/18176/unable-to-fetch-data-using-query-entity/71499"]its not necessary to use INCLUDES although if i use IN it is not fetching the&amp;nbsp;package id starting with 1 or 2 or 3 or anothing[/quote]
&lt;p&gt;The use case you&amp;#39;re describing&amp;nbsp;&lt;em&gt;does&lt;/em&gt; require&amp;nbsp;&lt;strong&gt;INCLUDES&lt;/strong&gt;, though.&amp;nbsp; That&amp;#39;s what I was explaining in my prior answer.&amp;nbsp;&amp;nbsp;&lt;strong&gt;IN&lt;/strong&gt; does something completely different -- it would never give you the result you&amp;#39;re currently thinking of, as it finds&amp;nbsp;&lt;em&gt;exact matches&lt;/em&gt; within an&amp;nbsp;&lt;em&gt;array of query inputs&lt;/em&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to fetch data using query entity</title><link>https://community.appian.com/thread/71500?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 05:55:11 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:5e9fe67a-aa04-4a44-8cd8-f26b757b7448</guid><dc:creator>Ashwin </dc:creator><description>&lt;p&gt;yes it is integer type and i am trying to find all the package ID starting with 1 but nor IN neither INCLUDES are working to fetch the result&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;eg:- if i have a data with 123,124,125,126 and if i try to find with 1 then it should result all the list of array&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to fetch data using query entity</title><link>https://community.appian.com/thread/71499?ContentTypeID=1</link><pubDate>Fri, 17 Jan 2020 05:53:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:210c1206-0a8d-4520-951b-82d659613332</guid><dc:creator>Ashwin </dc:creator><description>&lt;p&gt;its not necessary to use INCLUDES although if i use IN it is not fetching the&amp;nbsp;package id starting with 1 or 2 or 3 or anothing&amp;nbsp;&lt;/p&gt;
&lt;p&gt;code below&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;if(&lt;br /&gt; rule!TMOS_isEmpty(&lt;br /&gt; ri!packageID&lt;br /&gt; ),&lt;br /&gt; {},&lt;br /&gt; index(&lt;br /&gt; a!queryEntity(&lt;br /&gt; entity: cons!TMOS_ETY_WF_EXEC_AUDIT,&lt;br /&gt; query: a!query(&lt;br /&gt; filter: a!queryFilter(&lt;br /&gt; field: &amp;quot;packageID&amp;quot;,&lt;br /&gt; operator: &amp;quot;IN&amp;quot;,&lt;br /&gt; value: ri!packageID&lt;br /&gt; ),&lt;br /&gt; pagingInfo: a!pagingInfo(&lt;br /&gt; startIndex: 1,&lt;br /&gt; batchSize: - 1&lt;br /&gt; )&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;packageID(array type-integer)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to fetch data using query entity</title><link>https://community.appian.com/thread/71491?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2020 13:48:22 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:aca7e712-2c99-4769-844d-dc0af81a784b</guid><dc:creator>Mike Schmitt</dc:creator><description>&lt;p&gt;The &amp;quot;INCLUDES&amp;quot; operator is intended for comparing text, so it wouldn&amp;#39;t be expected to work on integer data (which I assume your &amp;quot;packageID&amp;quot; is).&amp;nbsp; &amp;quot;IN&amp;quot; should work, but is used for exact matches against an array, i.e. you&amp;#39;d query &amp;quot;IN&amp;quot; and pass in an array i.e. {11, 22, 33}, and any packages with an ID of 11, 22, or 33 (but not &amp;quot;7225&amp;quot;) would be returned.&lt;/p&gt;
&lt;p&gt;Assuming I&amp;#39;m correct about packageID&amp;#39;s type, and if you really need to do an &amp;quot;INCLUDES&amp;quot; search against it from an interface, for example, then you should be able to create a View that is basically a recreation of that table but with the addition of an additional column (i.e. &amp;quot;packageIdText&amp;quot;) where you typecast the original packageID to text.&amp;nbsp; If you get that working, and create a query entity against that view instead of the table you were originally querying, you should be able to do an &amp;quot;INCLUDES&amp;quot; query on the new text-type column.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to fetch data using query entity</title><link>https://community.appian.com/thread/71489?ContentTypeID=1</link><pubDate>Thu, 16 Jan 2020 13:25:57 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7181feee-840f-47bc-b93b-1e3b8a1810e6</guid><dc:creator>Stewart Burchell</dc:creator><description>&lt;p&gt;This is basically saying that Appian can&amp;#39;t compare two different types of data. What datatype is the field &amp;#39;packageID&amp;#39;? (ri!&lt;span&gt;packageID appears to be&amp;nbsp;&amp;#39;List of Number (Integer)&amp;#39;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>