1. 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. 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. 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. 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. 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

Posting Permissions

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