<?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 Appian Logs function returing different result set in different environments</title><link>https://community.appian.com/discussions/f/general/18541/query-appian-logs-function-returing-different-result-set-in-different-environments</link><description>HI I&amp;#39;m currently using below code to retrieve the audit log from Appian logs. Is there any way to call the audit log and provide the result set in a specific order?</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Query Appian Logs function returing different result set in different environments</title><link>https://community.appian.com/thread/73001?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 17:14:13 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:79ec90b6-241e-4671-9534-82a105bb6a8f</guid><dc:creator>adithyay</dc:creator><description>&lt;p&gt;Hello &lt;a href="/members/justinw59"&gt;Justin Watts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Question is not about the Values&amp;nbsp;&lt;br /&gt;its about the columns.&lt;br /&gt;Example&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In Dev - Result set returns&amp;nbsp;something like Datetime, IP Address, Username...&amp;nbsp;&lt;br /&gt;In Test - Result set returns something like IP Address, Date time, username.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I would like to have resultset&amp;nbsp; in the same order in all the environments.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Query Appian Logs function returing different result set in different environments</title><link>https://community.appian.com/thread/72999?ContentTypeID=1</link><pubDate>Tue, 31 Mar 2020 16:36:30 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ea16ef1a-5bb0-45fe-ba04-9cf02eae18e2</guid><dc:creator>Justin Watts</dc:creator><description>&lt;p&gt;The sql statement supports order by. From what I&amp;#39;ve tested, you can specific a numeric value as the column to order, where that number corresponds with the column in the login-audit csv.&lt;/p&gt;
&lt;p&gt;For example, to sort on username (column 2):&lt;/p&gt;
&lt;p&gt;queryappianlogs(&lt;br /&gt; sqlStatement: &amp;quot;SELECT * FROM login-audit order by 2 asc&amp;quot;,&lt;br /&gt; hasHeader: false()&lt;br /&gt;).data&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>