Hello,
The following is a portion of my "Search.cfm" file in which I posed a question(breaking a Field into two, FirstName & LastName) last July and implemented Carl's response. Worked great. However the results "NAMES" is presented to the user (to pick a name for search) sorted by FirstName which is the original "OWNER" order. Although I have added the "SortList" to sort the "NAMES" but it does not have any effect on the final results. I need to be able to sort the results(NAMES) by LastName. How can I use "ListOrder"? what else can be done to put the results in Order by LastName?
Thanks a bunch for your help.
-Rookie guy
==================================
here is a portion of my code:
...
<SELECT style="width: 400;" NAME="theOwnerName" SIZE="1">
<OPTION VALUE="%">SELECT A NAME:
<CFOUTPUT QUERY="myOwnerQuery">
<cfset FirstName=Listfirst(Owner, ","
>
<cfset LastName=ListRest(Owner, ","
>
<cfset Names=LastName & ", " & FirstName>
<cfset sortedlist = ListSort(Names, "Text", "Asc"
>
<OPTION VALUE="#OWNER#">#sortedlist#
</OPTION>
</cfoutput>
</SELECT>
...
The following is a portion of my "Search.cfm" file in which I posed a question(breaking a Field into two, FirstName & LastName) last July and implemented Carl's response. Worked great. However the results "NAMES" is presented to the user (to pick a name for search) sorted by FirstName which is the original "OWNER" order. Although I have added the "SortList" to sort the "NAMES" but it does not have any effect on the final results. I need to be able to sort the results(NAMES) by LastName. How can I use "ListOrder"? what else can be done to put the results in Order by LastName?
Thanks a bunch for your help.
-Rookie guy
==================================
here is a portion of my code:
...
<SELECT style="width: 400;" NAME="theOwnerName" SIZE="1">
<OPTION VALUE="%">SELECT A NAME:
<CFOUTPUT QUERY="myOwnerQuery">
<cfset FirstName=Listfirst(Owner, ","
<cfset LastName=ListRest(Owner, ","
<cfset Names=LastName & ", " & FirstName>
<cfset sortedlist = ListSort(Names, "Text", "Asc"
<OPTION VALUE="#OWNER#">#sortedlist#
</OPTION>
</cfoutput>
</SELECT>
...