<?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>Best way of creating a query?</title><link>https://community.appian.com/discussions/f/best-practices/21069/best-way-of-creating-a-query</link><description>Hi all, 
 In Appian, we can create queries directly in a UI , in local variables , or in a process model using script tasks , through rules , and also in node inputs as well. What is the best way to handle them? have come across one such question which</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Best way of creating a query?</title><link>https://community.appian.com/thread/82100?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 08:03:07 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:60a70569-96bf-4062-ba3e-1b2a0d71dc2e</guid><dc:creator>Dhananjay Kumar</dc:creator><description>&lt;p&gt;Appian is evolving each day and lot of new features adding up.&lt;br /&gt;You can put your query in a rule and use in the data parameter of the read-only grid function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way of creating a query?</title><link>https://community.appian.com/thread/82099?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 07:58:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1b9efbd2-2fac-46d7-bfab-4c811cff7bc0</guid><dc:creator>Saahil Mulla</dc:creator><description>&lt;p&gt;The scenario is to show a read-only grid based on a query. The query can be passed from a script task to UI or directly call in the interface under the data parameter. What should be best considering performance?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way of creating a query?</title><link>https://community.appian.com/thread/82098?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 07:55:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c03dd9c2-2550-46af-aea4-d3383ea6f711</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Thats just two different things. If you need the data in process, then do that in a script task. If the data is just needed to be displayed to a user, then do it in the interface. Typically you will do a mix of both.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way of creating a query?</title><link>https://community.appian.com/thread/82097?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 07:53:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1b5145b7-ac90-4cbd-8e8d-a3c69d1a41f2</guid><dc:creator>Dhananjay Kumar</dc:creator><description>&lt;p&gt;I guess it would be the ways how it execute, like if its under rule then it first render rule and then parent rule, if its directly on interface it does not do so like that.&lt;br /&gt;&lt;br /&gt;Could you please tell what exactly you&amp;#39;re looking for?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way of creating a query?</title><link>https://community.appian.com/thread/82095?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 07:33:26 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:689d062b-0dd7-4005-ab2c-f045437b9dcb</guid><dc:creator>Saahil Mulla</dc:creator><description>&lt;p&gt;Thank you Stefan and Dhananjay,&amp;nbsp;does querying directly in an interface and the one from the script task have a different impact on performance?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way of creating a query?</title><link>https://community.appian.com/thread/82094?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 06:56:58 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:21fd366b-bd87-4879-9ee3-ab4598a9ac0f</guid><dc:creator>Dhananjay Kumar</dc:creator><description>&lt;p&gt;There is nothing best but I would say most efficient way is to create rule due to following reasons&lt;br /&gt;&lt;br /&gt;1. One place change - Change in the rule reflects at all dependent objects&lt;br /&gt;2. Reusability - Can be used at many places&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Best way of creating a query?</title><link>https://community.appian.com/thread/82093?ContentTypeID=1</link><pubDate>Thu, 27 May 2021 06:53:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:fa556c12-8d81-44bf-a795-24338d63841a</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;I typically wrap each query into a separate expression for ease of debugging and testing. Then I use this wherever necessary.&lt;/p&gt;
&lt;p&gt;In interfaces we typically use local variables to store the output. If data is needed in a process, then do that in a script task.&lt;/p&gt;
&lt;p&gt;Does that answer your question?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>