Sort by Address

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
christopherb
Posts: 304
Joined: Fri Jun 22, 2007 8:26 pm

Sort by Address

Post by christopherb »

A thought... let say you have a address attribute (123 main street.) And now you wish to order them by street name in a list ASC. So the obvious trouble would become that following order would take place.

122 Power Street
123 main Street

The numeric portion of the address would create the order prior to the street name.

Can you "pass over" a numeric part of the address attribute to create an order by the street name without creating a separate attribute for the street number?

(hope that makes sense)

Cheers,
Cheers,

Christopher
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

Chris,

I think you could sort on a new attribute and have it built by a rule something like:

Customer.Address_Sort=WORDS_FROM_RIGHT(Customer.Address,(WORD_NUMBER(Customer.Address)-1))

Tom
christopherb
Posts: 304
Joined: Fri Jun 22, 2007 8:26 pm

Post by christopherb »

Tom,
I was thinking the same idea though i will need to play with it more to get it to work properly based on the varations in street name like the following

main st.
main street
main

and so on...


Thank you
Chris
Cheers,

Christopher
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Post by tford »

As long as the # is the first "word" in the test attribute, the rest way the rest of the words are structured should not matter should it?

Tom
Post Reply