1 Reply Latest reply on Nov 29, 2013 6:43 AM by SteveMartino

    How to re-order records in list view?

    NolenUglade

      Title

      How to re-order records in list view?

      Post

           Ok,  it's the same concept as dragging fields, in List View, in the right column but I want to do something like this for record rows.


           I have these two fields: Order and Name

      Order        Name

           [ 5 ]            James

           [ 7 ]            Mary

           [ 3 ]            Dan

           [    ]            Sally

           [ 3 ]            Spartacus

           -------------------------------------

           Move them into this order

      Order        Name

           [ 3 ]            Dan

           [    ]            Sally

           [ 5 ]            James

           [ 3 ]            Spartacus

           [ 7 ]            Mary

           -------------------------------

           And then re-number

      Order        Name

           [ 1 ]            Dan

           [ 2 ]            Sally

           [ 3 ]            James

           [ 4 ]            Spartacus

           [ 5 ]            Mary

                          **Update: At least I figured this part out

      Freeze Window

      Go to Record/Request/Page[ First ]

      Set Variable [ $X; Value:1 ]

      Loop

           Set Field [ Order::Order; $X ]

           Set Variable [ $X; Value:$X + 1 ]

           Go to Record/Request/Page [ Next; Exit after last ]

      End Loop

      Go to Record/Request/Page [ First ]

      Refresh Window 

      *****************************

           I can do this manually changing the numbers but it's a pain when I have a table with 100 records, especially with I have to move record, out of place.