Sorting a string alphabetically.

2001-12-06 Thread Darren Adams

Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION
~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Sorting a string alphabetically.

2001-12-06 Thread Carlisle, Eric

ListSort()

EC

-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 8:46 AM
To: CF-Talk
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Sorting a string alphabetically.

2001-12-06 Thread Boardwine, David L.

ListToArray
Arraysort
Arraytolist

This may work. HTH

-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 8:46 AM
To: CF-Talk
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION

~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Sorting a string alphabetically.

2001-12-06 Thread Adkins, Randy

You could covert it to a structure and then sort it.

Example convert it to an array then use ArraySort

Then if you still need the list, convert it back to a
list format.

-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 8:46 AM
To: CF-Talk
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION

~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Sorting a string alphabetically.

2001-12-06 Thread Darren Adams

Thanking you kindly !

*tips hat*

-Original Message-
From: Carlisle, Eric [mailto:[EMAIL PROTECTED]]
Sent: 06 December 2001 13:55
To: CF-Talk
Subject: RE: Sorting a string alphabetically.


ListSort()

EC

-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 8:46 AM
To: CF-Talk
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION


~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Sorting a string alphabetically.

2001-12-06 Thread Darren Adams

That was going to be my next approach.

Thanks

-Original Message-
From: Adkins, Randy [mailto:[EMAIL PROTECTED]]
Sent: 06 December 2001 13:56
To: CF-Talk
Subject: RE: Sorting a string alphabetically.


You could covert it to a structure and then sort it.

Example convert it to an array then use ArraySort

Then if you still need the list, convert it back to a
list format.

-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 8:46 AM
To: CF-Talk
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Sorting a string alphabetically.

2001-12-06 Thread Dave Hannum

CF 4.5 and up:

ListSort(list, ,)

Dave


- Original Message - 
From: Darren Adams [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 8:46 AM
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION

~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Sorting a string alphabetically.

2001-12-06 Thread Dave Hannum

Ah - too fast on the previous post:

ListSort(list, TextNoCase, ASC, ,)

Dave



- Original Message - 
From: Darren Adams [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 8:46 AM
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Sorting a string alphabetically.

2001-12-06 Thread Darren Adams

Works on Server 4 

-Original Message-
From: Dave Hannum [mailto:[EMAIL PROTECTED]]
Sent: 06 December 2001 14:03
To: CF-Talk
Subject: Re: Sorting a string alphabetically.


Ah - too fast on the previous post:

ListSort(list, TextNoCase, ASC, ,)

Dave



- Original Message - 
From: Darren Adams [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 8:46 AM
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION


~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Sorting a string alphabetically.

2001-12-06 Thread Mike Connolly

Try ListSort()

Extract of help text

ListSort
Sorts and delimits the items in a list according to the specified sort type
and sort order.

Note  ColdFusion ignores empty list elements; thus, a list that is defined
as a,b,c,,,d is treated as a four element list not as a six element list.



Syntax
ListSort(list, sort_type [, sort_order] [, delimiter ])

list
List to be sorted. The items in the list must be separated by commas or
otherwise delimited.

sort_type
The type of sort to be executed. You can specify any of the following sort
types:

Numeric - sorts numbers. 
Text - sorts text alphabetically. 
Textnocase - sorts text alphabetically. The case is ignored. 
sort_order
The order to be followed. You can specify any of the following:

Asc - (Default) Ascending sort order. 
Desc - Descending sort order. 
delimiter
Specify the character(s) used to delimit elements in the list. Default is
comma ( , ). 

Example
!--- This example shows how to use ListSort---
HTML
HEAD
TITLEListSort Example/TITLE
/HEAD

BODY
H3ListSort Example/H3

!--- Find a list of users who wrote messages ---
CFQUERY NAME=GetMessageUser DATASOURCE=cfsnippets
SELECT Username, Subject, Posted
FROM Messages
/CFQUERY

CFSET myList = ValueList(GetMessageUser.UserName)
PHere is the unsorted list. /P

CFOUTPUT
#myList#
/CFOUTPUT
PHere is the list sorted alphabetically:/P
CFSET sortedList = ListSort(myList, Text)
CFOUTPUT
#sortedList#
/CFOUTPUT

PHere is a numeric list that is to be sorted in descending order./P
CFSET sortedNums = ListSort(12,23,107,19,1,65,Numeric, Desc)
CFOUTPUT
#sortedNums#
/CFOUTPUT

PHere is a list that must be sorted numerically, since it contains both
negative and positive numbers, as 
well as decimal numbers. /P

CFSET sortedNums2 = ListSort(23.75;-34,471:100,-9745,Numeric, ASC,
;,:)

CFOUTPUT
#sortedNums2#
/CFOUTPUT

PHere is a list that is to be sorted alphabetically without consideration
of case./P

CFSET sortedMix =
ListSort(hello;123,HELLO:jeans,-345,887;ColdFusion:coldfusion,
TextNoCase, 
ASC, ;,:)

CFOUTPUT
#sortedMix#
/CFOUTPUT

/BODY
/HTML 





-Original Message-
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: 06 December 2001 13:46
To: CF-Talk
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION

~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: Sorting a string alphabetically.

2001-12-06 Thread Dave Hannum

Good, I just couldn't remember if it went back that far.  I had the old 4.5
docs and it was in there.

Dave


- Original Message -
From: Darren Adams [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 9:09 AM
Subject: RE: Sorting a string alphabetically.


Works on Server 4

-Original Message-
From: Dave Hannum [mailto:[EMAIL PROTECTED]]
Sent: 06 December 2001 14:03
To: CF-Talk
Subject: Re: Sorting a string alphabetically.


Ah - too fast on the previous post:

ListSort(list, TextNoCase, ASC, ,)

Dave



- Original Message -
From: Darren Adams [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 8:46 AM
Subject: Sorting a string alphabetically.


Hello All,

Just looking for a function to take a string  of comma delimited words and
sort them in alphabetical order.

e.g. Company structure,Executive team,Jobs,Locations,Prod_Introduction

Can anyone advise ?


Cheers,


Darren Adams
Web Developer
Marketing Department
Systems Union

Email: [EMAIL PROTECTED]

Data + Structure = INFORMATION



~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists