<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Sorting a drop-down list</title><link>https://www.infopathdev.com:443/forums/thread/50388.aspx</link><pubDate>Thu, 07 Jan 2010 15:30:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50388</guid><dc:creator>kcoakley</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50388.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50388</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Jimmy - thanks for your reply.&lt;/p&gt;&lt;p&gt;I&amp;#39;m fairly certain that my xsl:sort is right and is not being removed by InfoPath. These are the steps I&amp;#39;m taking:&lt;/p&gt;&lt;p&gt;1. I edit the view1.xsl file and add the &amp;quot;xsl:sort&amp;quot; element. (I tried it with and without the &amp;quot;select&amp;quot; attribute.) Save &amp;amp; close.&lt;br /&gt;2. I right click the .xsn file and choose Open. This opens the form in InfoPath (not in designer mode). The drop-down list is not sorted. Exit.&lt;br /&gt;3. If I look back at the view1.xsl file, the &amp;quot;xsl:sort&amp;quot; element is still there.&lt;/p&gt;&lt;p&gt;Does that sound right? &lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks for the qRules suggestion - I&amp;#39;m going to give that a try next. And the other alternative, as you point out, is to go back to the data source and do the sort on that end.&lt;/p&gt;&lt;p&gt;Thanks again,&lt;br /&gt;Ken&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Sorting a drop-down list</title><link>https://www.infopathdev.com:443/forums/thread/50386.aspx</link><pubDate>Thu, 07 Jan 2010 15:22:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50386</guid><dc:creator>kcoakley</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50386.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50386</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi ricomarcelo and thanks for your suggestion... I poked through the secondary datasource options for the web service and don&amp;#39;t see any sorting choices at all. Maybe I&amp;#39;m just missing something, but other sources I&amp;#39;ve read seem to suggest that there isn&amp;#39;t a simple solution in this circumstance.&lt;/p&gt;&lt;p&gt;Thanks!&lt;br /&gt;Ken&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Sorting a drop-down list</title><link>https://www.infopathdev.com:443/forums/thread/50369.aspx</link><pubDate>Thu, 07 Jan 2010 00:30:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50369</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50369.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50369</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;If you have any way of receiving the data in a sorted form like ricomarcelo suggested, that may be the easiest approach.&lt;/p&gt;&lt;p&gt;As for getting your xsl:sort to work, maybe it&amp;#39;s not working because there&amp;#39;s no &lt;b&gt;select&lt;/b&gt; attribute? (It should work without one though...) Or is it possible you&amp;#39;re making a small change in the designer and not realizing it before previewing the form and that&amp;#39;s obliterating the xsl:sort.&lt;/p&gt;&lt;p&gt;I&amp;#39;m not 100% sure, but I don&amp;#39;t think that a Preserve Code Block is the solution here, because I think Preserve Code Blocks can only display data, and not contain data-bound controls.&amp;nbsp; I could be mistaken though.&lt;/p&gt;&lt;p&gt;&amp;nbsp;For an easy-to-use alternative to using code, try out &lt;a href="http://www.qdabra.com/en/products/qRules.aspx"&gt;qRules&lt;/a&gt;. It provides a SortTable feature, that can sort the data in your secondary data source with just one command.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Sorting a drop-down list</title><link>https://www.infopathdev.com:443/forums/thread/50365.aspx</link><pubDate>Wed, 06 Jan 2010 21:54:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50365</guid><dc:creator>ricomarcelo</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50365.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50365</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m also new to InfoPath but in my case I&amp;#39;m using Access as my secondary datasource and sorting the items is&amp;nbsp;very very&amp;nbsp;easy. Just a matter of selecting some options in&amp;nbsp;Tools /&amp;nbsp;Data Connections. I&amp;#39;m not sure if the same can be done with web service as the secondary datasource because I haven&amp;#39;t tried&amp;nbsp;that yet.&lt;/p&gt;</description></item><item><title>Re: Sorting a drop-down list</title><link>https://www.infopathdev.com:443/forums/thread/50351.aspx</link><pubDate>Wed, 06 Jan 2010 16:17:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50351</guid><dc:creator>kcoakley</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50351.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50351</wfw:commentRss><description>&lt;p&gt;Hi Anuma, and thanks for your response!&lt;/p&gt;
&lt;p&gt;I have gone through the links you provided and am still unable to get the sort to work. Based upon what I&amp;#39;ve read above, there appear to be two ways to accomplish this sort:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;1. &lt;strong&gt;Using the &amp;quot;xsl:sort&amp;quot; element in the view.xsl file&lt;/strong&gt;. (This is what I tried to do with the code shown in my original post.) Your first link seems to suggest that this should work, but that I may need a &amp;quot;Preserve Code Block.&amp;quot; However, as I understand it, the &amp;quot;Preserve Code Block&amp;quot; is only needed to prevent InfoPath from stripping out the unsupported code if I use the InfoPath Designer after manually adding the &amp;quot;xsl:sort.&amp;quot; Shouldn&amp;#39;t I be able to manually add the &amp;quot;xsl:sort&amp;quot; element and then preview the form to see that it is working without having to add the &amp;quot;Preserve Code Block?&amp;quot; That said, however, I did add the &amp;quot;Preserve Code Block&amp;quot; and still did not accomplish the sort.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;2. &lt;strong&gt;Coding the sort.&lt;/strong&gt; I&amp;#39;ve looked at the code examples and tried a few but none seem to work for me. (My error, I am sure.) I am still learning to code for InfoPath and this is a bit beyond my ability right now.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;So I guess my current question is: should the &amp;quot;xsl:sort&amp;quot; element be working for this drop-down list as coded in my original post? If not, what is the next easiest way to accomplish this?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks again!&lt;br /&gt;Ken&lt;/p&gt;</description></item><item><title>Re: Sorting a drop-down list</title><link>https://www.infopathdev.com:443/forums/thread/50342.aspx</link><pubDate>Wed, 06 Jan 2010 05:30:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50342</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50342.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50342</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you verify below links.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.infopathdev.com/forums/p/4107/16228.aspx#16228"&gt;http://www.infopathdev.com/forums/p/4107/16228.aspx#16228&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.infopathdev.com/forums/p/10102/35832.aspx#35832"&gt;http://www.infopathdev.com/forums/p/10102/35832.aspx#35832&lt;/a&gt;&lt;br /&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/4f739cec-220e-4ab2-a6d9-13079e43844a"&gt;http://social.msdn.microsoft.com/Forums/en-US/sharepointinfopath/thread/4f739cec-220e-4ab2-a6d9-13079e43844a&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Sorting a drop-down list</title><link>https://www.infopathdev.com:443/forums/thread/50322.aspx</link><pubDate>Tue, 05 Jan 2010 18:02:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50322</guid><dc:creator>kcoakley</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50322.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=50322</wfw:commentRss><description>&lt;p&gt;Hello and thanks for such a great resource!&lt;/p&gt;
&lt;p&gt;What I&amp;#39;m trying to do: I&amp;#39;m pulling a list of employee names from a secondary data source (web service) into a drop-down list. I would like to have the list sorted alphabetically, but it doesn&amp;#39;t appear that InfoPath supports this directly.&lt;/p&gt;
&lt;p&gt;I have searched these forums and thought I found a solution - adding the &amp;quot;xsl:sort&amp;quot; element to my view1.xsl file. But I must be missing something because the drop-down list does not appear sorted when I preview it. Here is the block of code I&amp;#39;ve modified: (my addition is in bold)&lt;/p&gt;
&lt;p&gt;&amp;lt;xsl:for-each select=&amp;quot;xdXDocument:GetDOM(&amp;amp;quot;GetEmployeeList&amp;amp;quot;)/dfs:myFields/dfs:dataFields/s0:GetEmployeeListResponse/s0:GetEmployeeListResult/ns1:SqlRowSet1/ns1:row1/ns1:EmployeeName&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;strong&gt;&amp;lt;xsl:sort/&amp;gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;option&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;xsl:attribute name=&amp;quot;value&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;xsl:value-of select=&amp;quot;.&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;xsl:if test=&amp;quot;$val=.&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;xsl:attribute name=&amp;quot;selected&amp;quot;&amp;gt;selected&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/xsl:if&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;xsl:value-of select=&amp;quot;.&amp;quot;/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/xsl:for-each&amp;gt;&lt;/p&gt;
&lt;p&gt;Should this work as I&amp;#39;m expecting it to? What am I doing wrong?&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;br /&gt;Ken&lt;/p&gt;</description></item></channel></rss>