Thank you Ben and Chris --That's a GREAT tip! -- Jillian
> -----Original Message----- > From: Lofback, Chris [mailto:[EMAIL PROTECTED] > Sent: July 24, 2003 11:14 AM > To: CF-Talk > Subject: RE: Array Delimiter Problems > > > As a helpful tip, I prefer to use the non-typable "bell" > character as a list delimiter. I put this in my > app_globals.cfm (if using FB) or application.cfm: > > <CFSET DELIM = Chr(7)> > > Then use DELIM in all list functions, like this: > > <CFOUTPUT>#ListGetAt(whatsnew[k],2,DELIM)#</CFOUTPUT> > > Using a character that cannot be typed from a standard > keyboard will greatly reduce (if not eliminate) the chance of > a list delimiter error. It's also easy to maintain, if you > ever need to change the delimiter character. > > Chris > > > > -----Original Message----- > > From: Ben Doom [mailto:[EMAIL PROTECTED] > > Sent: Thursday, July 24, 2003 12:42 PM > > To: CF-Talk > > Subject: RE: Array Delimiter Problems > > > > > > You're not specifying the pipe as the delimiter in your listlast()s. > > > > > > -- Ben Doom > > Programmer & General Lackey > > Moonbow Software, Inc > > > > : -----Original Message----- > > : From: Jillian Carroll [mailto:[EMAIL PROTECTED] > > : Sent: Thursday, July 24, 2003 12:20 PM > > : To: CF-Talk > > : Subject: Array Delimiter Problems > > : > > : > > : Good Morning! > > : > > : I've got an array that worked, other than when content contained > > : a comma (of > > : course)... and because a comma is a common character that > > is actually > > : required in these fields, I wanted to change the delimiter in my > > : array to a > > : |. I made the change below, but I'm no longer having any results > > : returned. > > : Can anybody help me find out why? > > : > > : -- > > : Jillian > > : > > : *** *** *** > > : > > : CODE: > > : > > : <cfquery name="whatsnewlink" datasource="cts"> > > : SELECT id, > > : name, > > : url, > > : datebox > > : FROM link > > : WHERE link.include = 'yes' AND datebox >= #now()# > > : </cfquery> > > : > > : <cfquery name="whatsnewgs" datasource="cts"> > > : SELECT id, > > : title AS name, > > : url, > > : datebox > > : FROM gs > > : WHERE gs.include = 'yes' AND datebox >= #now()# > > : </cfquery> > > : > > : <cfquery name="whatsnewevents" datasource="cts"> > > : SELECT id, > > : title AS name, > > : url, > > : datebox > > : FROM events > > : WHERE events.include = 'yes' AND datebox >= #now()# > > : </cfquery> > > : > > : <cfquery name="whatsnewprof" datasource="cts"> > > : SELECT id, > > : title AS name, > > : url, > > : datebox > > : FROM professional > > : WHERE professional.include = 'yes' AND datebox >= #now()# > > : </cfquery> > > : > > : <cfquery name="whatsnewresearch" datasource="cts"> > > : SELECT id, > > : title AS name, > > : url, > > : datebox > > : FROM research > > : WHERE research.include = 'yes' AND datebox >= #now()# > > : </cfquery> > > : > > : <cfscript> > > : pound = chr(35); // ascii for "#" character > > : </cfscript> > > : > > : <cfset whatsnew = arraynew(1)> > > : <cfset i=0> > > : > > : <p> > > : <cfloop Query="whatsnewlink"> > > : <cfset i = i + 1> > > : <cfset whatsnew[i] = "#datebox#|#name#|#url#|#id#|link"> > > : <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |", > > : "ALL")> > > : </cfloop> > > : <cfloop Query="whatsnewgs"> > > : <cfset i = i + 1> > > : <cfset whatsnew[i] = "#datebox#|#name#|#url#|#id#|gs"> > > : <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |", > > : "ALL")> > > : </cfloop> > > : <cfloop Query="whatsnewevents"> > > : <cfset i = i + 1> > > : <cfset whatsnew[i] = > > "#datebox#|#name#|#url#|#id#|events"> > > : <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |", > > : "ALL")> > > : </cfloop> > > : <cfloop Query="whatsnewprof"> > > : <cfset i = i + 1> > > : <cfset whatsnew[i] = > > : "#datebox#|#name#|#url#|#id#|professional"> > > : <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |", > > : "ALL")> > > : </cfloop> > > : <cfloop Query="whatsnewresearch"> > > : <cfset i = i + 1> > > : <cfset whatsnew[i] = > > "#datebox#|#name#|#url#|#id#|research"> > > : > > : <cfset whatsnew[i] = replace(whatsnew[i], "||", "| |", > > : "ALL")> > > : </cfloop> > > : > > : <cfset isSuccessful = ArraySort(whatsnew, "textnocase", "desc")> > > : > > : > > : <cfoutput> > > : <cfloop index="K" from="1" to="#i#"> > > : <cfif ListLast(whatsnew[k]) EQ "link"> > > : <tr> > > : <td bgcolor=ddd9ea > > : class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a > > : href=http://#ListGetAt(whatsnew[k],3,"|")# class="smtext"> > > >> </a></td> > > : </tr> > > : <cfelseif ListLast(whatsnew[k]) EQ "gs"> > > : <tr> > > : <td bgcolor=ddd9ea > > : class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a > > : href=http://www.lung.ca/cts/guidelines.cfm#pound##ListGetAt(whatsn > > : ew[k],4,"| > > : ")# class="smtext"> >> </a></td> > > : </tr> > > : <cfelseif ListLast(whatsnew[k]) EQ "events"> > > : <tr> > > : <td bgcolor=ddd9ea > > : class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a > > : href=http://www.lung.ca/cts/events.cfm#pound##ListGetAt(whatsnew[k > > : ],4,"|")# > > : class="smtext"> >> </a></td> > > : </tr> > > : <cfelseif ListLast(whatsnew[k]) EQ "professional"> > > : <tr> > > : <td bgcolor=ddd9ea > > : class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a > > : href=http://www.lung.ca/cts/prodev.cfm#pound##ListGetAt(whatsnew[k > > : ],4,"|")# > > : class="smtext"> >> </a></td> > > : </tr> > > : <cfelseif ListLast(whatsnew[k]) EQ "research"> > > : <tr> > > : <td bgcolor=ddd9ea > > : class="smtext">#ListGetAt(whatsnew[k],2,"|")#<a > > : href=http://www.lung.ca/cts/research.cfm#pound##ListGetAt(whatsnew > > : [k],4,"|") > > : # class="smtext"> >> </a></td> > > : </tr> > > : </cfif> > > : </cfloop> > > : </cfoutput> > > : > > : > > : > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4