Sorting a repeating table - InfoPath Dev
in

InfoPath Dev

Sorting a repeating table

Last post 04-09-2013 02:04 PM by nikos_gr. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-05-2013 10:26 AM

    Sorting a repeating table

    Hello, I have an InfoPath 2007 form and wish to sort by descending order a repeating table on a project number column. I tried several methods that found online that requires quite a lot of programming with no success. Anyone here that willing to help? Thank you
  • 04-07-2013 09:36 PM In reply to

    Re: Sorting a repeating table

    No programming is needed for this, but you do need to either a) modify the view.xsl, or b) use our qRules add-on that has a command for sorting.

    The first approach (modifying the xsl to include an xsl:sort operator) requires exporting the XSN as source files and then opening up view.xsl (or whichever view you have the control in). Search for the control. You'll have to add the custom xsl:sort attribute and that can be a little tricky. I am guessing there are a lot of examples in this forum if you search. I believe Greg Collins may have uploaded a sample too. If you can't find them, please send me email.

    The second approach is easier (but it does require our qRules library). You can download a free trial of qRules from the Qdabra dot com web site and it will install a user guide that has an example of how to use the sort command.

    Best of luck,

    Patrick

    Patrick Halstead
    Project Manager at Qdabra
  • 04-09-2013 02:04 PM In reply to

    Re: Sorting a repeating table

    Thank you Patrick, I got it working with the code behind my query button in C# I modified the sql command by adding order by projectId DESC I have another issue though. I am trying to create a tracking mechanism for inserts, updates , deletes for sql. I used an example with database triggers. I have on my form a hidden field that gets the user name (windows login). After I hit the query button and the form populates with the data from the sql database, if I want to update a record and then hit submit, the form resubmits all the records back to sql. I just want to update just one record and send back to sql just this record. It also messes up who modified the records since the hidden field overwrites the rest of the records with the user name that did he update. I have a master detail control on my form and the repeating table is my master and there is a repeating section for the details. Thank you, Nick
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.