Sort repeating section - InfoPath Dev
in

InfoPath Dev

Sort repeating section

Last post 08-09-2006 10:32 AM by Greg Collins. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-05-2006 07:57 PM

    • Carlos
    • Top 500 Contributor
    • Joined on 01-24-2006
    • Australia
    • Posts 31

    Sort repeating section

    Hi all,

    I have a form (based on SQL 2000) which has fields from a table and also another repeating section within that repeating section. Below is what SQL is looks like:

    Project - Project_ID, Person_ID, etc
    Person table - Person_ID, Project_ID, name, role_id, RL_ID,
    other fields
    Related_Project table - RP_ID, Project_ID, Project_Name

    Now I need to sort the Person table (on page load is fine) on the role-id field. This field contain a number as the key field. So, when creating multiple persons, each will have a role, some of the records have same role. What I want to do is resort so that they are grouped together, rather than having different roled mixed up as they are entered on the day, as its very hard to find a role this way.

    So, my forms are VBSCRIPT, and just needing some direction as to what code would be required to do this, if it can be done at all.

    Many thanks,
  • 08-07-2006 04:48 AM In reply to

    • Stavi
    • Top 100 Contributor
    • Joined on 12-13-2005
    • Posts 95
    If you setup a button to save new entries and query main connection in one go then the records would be re-sorted as per your data connection
  • 08-07-2006 10:20 AM In reply to

    Go to your data connection wizard, and there's a place where you can Edit SQL... this will allow you to place an ORDER BY statement in the SQL code so that your rows are ordered by the database before you ever get them in the form.
  • 08-07-2006 05:11 PM In reply to

    • Carlos
    • Top 500 Contributor
    • Joined on 01-24-2006
    • Australia
    • Posts 31
    I have done the sort in SQL which solved the problem. Many thanks.

    Carlos
  • 08-09-2006 10:32 AM In reply to

    Glad to have helped!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.