Alpha Video Training
Results 1 to 5 of 5

Thread: Complicated Sort Order

  1. #1
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default Complicated Sort Order

    I have a field that will contain numbers and decimal points. examples would be:

    001.001.001
    001.001.002
    001.002.001
    001.002.002
    001.002.003
    001.003.001
    002.001.002
    010.001.000
    010.002.000

    Sorting it with the decimals is where I run into a problem. I've tried separate fields for each block of numbers and then combined them to a single field and sorted on that but that didn't work.

    What is the best way to set this up so the field sorts sequentially?

    Thanks,

    kenn

  2. #2
    Guest rtobiassen's Avatar
    Real Name
    Rick Tobiassen
    Join Date
    May 2000
    Location
    Toronto, Canada
    Posts
    209

    Default RE: Complicated Sort Order

    Ken

    Can you treat each block as a separate field the way you would for first name, middle name, and last name then do a sort by field one plus two plus three. You could show the fields on forms and reports as a rich text field separated by the decimal point as an insert.

    Rick T.

  3. #3
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Complicated Sort Order

    Rick,

    Yes, I just figured it out. The Genie started it and then I added to it. What a tool!!

    Thanks much,

    kenn

  4. #4
    "Certified" Alphaholic
    Real Name
    William Hanigsberg
    Join Date
    Apr 2000
    Location
    Toronto, ON
    Posts
    4,018

    Default RE: Complicated Sort Order

    Hi Ken,

    What were your problems sorting the entries. I created a little table with one field to hold the data from your message. To help me learn V5 I set up a field rule with a mask allowing only numbers and specifying the decimal points as fixed characters.

    I indexed the field and it sorted properly. I had made a point of entering the data out order so index order and recno order differed.

    I was prepared to index on remspecial(fieldname) rather than just the field but this was unnecessary as the decimals are present in every record and do not effect the sort order.

    Am I missing something?

    Best,
    Bill

  5. #5
    "Certified" Alphaholic forskare's Avatar
    Real Name
    Ken Nordin
    Join Date
    Apr 2000
    Location
    Walker, MN
    Posts
    7,545

    Default RE: Complicated Sort Order

    No Bill, You're 'right on'. Just never thought of that. Now there's 2 ways. To show it in a calculated field w/o leading 0's, I would think the 3 field approach is needed and then concatenate (sp)them.

    Thanks for the reminder!

    kenn

Similar Threads

  1. sort by Biblical order
    By Philip Ramstad in forum Alpha Four Versions 7 and 8
    Replies: 7
    Last Post: 06-05-2005, 01:13 PM
  2. Browse Sort Order
    By Jeffrey Wolfe in forum Alpha Five Version 5
    Replies: 4
    Last Post: 08-21-2004, 09:32 PM
  3. sort order from newbie
    By Tony Moloney in forum Alpha Five Version 5
    Replies: 2
    Last Post: 07-16-2004, 06:32 PM
  4. Report sort order
    By Edward F. Schulz in forum Alpha Five Version 4
    Replies: 6
    Last Post: 11-09-2002, 01:16 PM
  5. Sort Order
    By Juli Carey in forum Alpha Five Version 4
    Replies: 7
    Last Post: 11-08-2001, 03:33 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •