<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Sorting a drop down list from SQL data source</title><link>https://www.infopathdev.com:443/forums/thread/97530.aspx</link><pubDate>Mon, 19 May 2014 14:57:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:97530</guid><dc:creator>fcoulter</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/97530.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=97530</wfw:commentRss><description>&lt;p&gt;Add me to the list of people who feel stupid.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I was working with InfoPath 2007 in my old job, and we had edited the SQL query in order to sort the results.&amp;nbsp; Now that I&amp;#39;m at a new job, with InfoPath 2013 on my desktop, I lost access to my old notes.&amp;nbsp; So I was going to&amp;nbsp;come here to find how to modify&amp;nbsp;the query so that it sorted the results.&lt;/p&gt;&lt;p&gt;AND IT&amp;#39;S BUILT INTO INFOPATH!&amp;nbsp; AND IT&amp;#39;S BEEN IN INFOPATH&amp;nbsp;THE WHOLE TIME.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Face plant time.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks for letting me&amp;nbsp;know about the obvious.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Sorting a drop down list from SQL data source</title><link>https://www.infopathdev.com:443/forums/thread/48003.aspx</link><pubDate>Mon, 19 Oct 2009 17:31:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:48003</guid><dc:creator>Patrick_NPS</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/48003.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=48003</wfw:commentRss><description>&lt;p&gt;Thanks Hilary!&amp;nbsp; It&amp;#39;s nice when I don&amp;#39;t have to spend more time than necessary to ahieve these simple things that seem to eat my lunch on many occasions :)&lt;/p&gt;</description></item><item><title>Re: Sorting a drop down list from SQL data source</title><link>https://www.infopathdev.com:443/forums/thread/42187.aspx</link><pubDate>Wed, 27 May 2009 22:54:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42187</guid><dc:creator>djj66</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42187.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42187</wfw:commentRss><description>&lt;p&gt;Hi Hilary,&lt;/p&gt;
&lt;p&gt;Yes it&amp;#39;s just a plain old SQL data connection - You&amp;#39;re exactly correct - I can use the sort options after pressing the Modify button.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve been working with InfoPath for about 4 months, but never pressed that button to see the sort options. (whoops, feel rather embarrassed now)&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve wasted hours and hours on this problem, looking&amp;nbsp;at&amp;nbsp;preserved code blocks,&amp;nbsp;code behind&amp;nbsp;etc. You&amp;#39;ve saved me hours more wasted effort.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks so much,&lt;/p&gt;
&lt;p&gt;regards&lt;br /&gt;David&lt;/p&gt;</description></item><item><title>Re: Sorting a drop down list from SQL data source</title><link>https://www.infopathdev.com:443/forums/thread/42160.aspx</link><pubDate>Wed, 27 May 2009 15:26:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42160</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42160.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42160</wfw:commentRss><description>&lt;p&gt;This is just a plain SQL data connection? When you walk through the data connection wizard, you have the option to click the &lt;strong&gt;Modify Table&lt;/strong&gt; button to the right of the window that displays your table and columns in a tree structure. When you click the &lt;strong&gt;Modify Table&lt;/strong&gt; button, you can specify sort options. You also have the option to edit the SQL directly....&lt;/p&gt;</description></item><item><title>Re: Sorting a drop down list from SQL data source</title><link>https://www.infopathdev.com:443/forums/thread/42102.aspx</link><pubDate>Wed, 27 May 2009 05:27:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42102</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42102.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42102</wfw:commentRss><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;Indeed the preserve code block with xsl:sort is one way to do it. Greg&amp;#39;s post: &lt;a href="http://www.infopathdev.com/forums/p/4107/16226.aspx"&gt;http://www.infopathdev.com/forums/p/4107/16226.aspx&lt;/a&gt;&amp;nbsp;. You&amp;#39;ll need to save your files as source and manually modify the XSL&amp;nbsp;file. If you need&amp;nbsp;help, send $50 to our PayPal account (Sales at no spam please Qdabra.com) and we&amp;#39;ll&amp;nbsp;walk you through it. It&amp;#39;s not that hard, but will require about 30 minutes.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;</description></item><item><title>Sorting a drop down list from SQL data source</title><link>https://www.infopathdev.com:443/forums/thread/42095.aspx</link><pubDate>Wed, 27 May 2009 02:08:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:42095</guid><dc:creator>djj66</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/42095.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=42095</wfw:commentRss><description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;I am using Infopath 2003, with VBScript where needed. I have created a form which is working well and which has several drop down lists which get their data from a SQL secondary data connection. As far as I can tell, there is no way to sort this drop down list(??) - it is always sorted using the Primary key field of the SQL table - is that correct?&lt;/p&gt;
&lt;p&gt;I have read several articles on this site about how to sort DDL&amp;#39;s but none seem to apply to my exact situtation&amp;nbsp;- I&amp;#39;m not using a Sharepoint list, nor a browser enabled form.&lt;/p&gt;
&lt;p&gt;Is it possible to resort the data coming into the Drop down list? - and how, do I need to use a &amp;quot;Preserve code block&amp;quot;? and do I need to use Code behind as well? (in VBSCRIPT)&lt;/p&gt;
&lt;p&gt;I know how to create a preserve code block, but not what to put in it? If someone can tell me exactly what I need to do, and a few snippets of code, I&amp;#39;m sure I can do the rest. &lt;/p&gt;
&lt;p&gt;Thanks in advance for your help, and hope to hear from someone soon :-) &lt;/p&gt;
&lt;p&gt;regards, david&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>