paul.nowak wrote: Matt, thanks for the comments. I made an error on the version of Plone. It's 2.5 Plone running on Zope 2.9x.
In regards to the additional products, we have a skin installed and we have a product that we had custom developed for us that connects to a PostgreSQL database. We've looked at slow PostgreSQL queries causing problems and have not been able to find an issue. We've also tested for the case where the PostgreSQL server is down and have not been able to create an issue. We therefor...
If you have to test a condition against many values in a CFIF, you may be tempted to write out a very long condition, such as:
CFIF FORM.STATE IS "MA" OR FORM.STATE IS "VT" FORM.STATE IS "AK" ...
This quickly becomes unwieldy. There is an alternative approach. Simply use the LISTFIND (or LISTFINDNOCASE) function instead, as in:
CFIF LISTFIND("MA,VT,AK",FORM.STATE)
Note that the list of values is specified first, then the value to search for in the list. Also, the LISTFIND function presumes you are using commas to separate list values, but if you need to test strings that contain commas, you can specify an alternate delimiter as the 3rd argument in the function.
Finally, be careful about the case (upper/lower) of both comparison strings. If the value of FORM.STATE were "ma", the condition would not be true. To cause the condition to ignore case, use LISTFINDNOCASE instead.
Charlie Arehart Education Director, Fig Leaf Software
About Charlie Arehart A veteran ColdFusion developer since 1997, Charlie Arehart is a long-time contributor to the community and a recognized Adobe Community Expert. He's a certified Advanced CF Developer and Instructor for CF 4/5/6/7 and served as tech editor of CFDJ until 2003. Now an independent contractor (carehart.org) living in Alpharetta, GA, Charlie provides high-level troubleshooting/tuning assistance and training/mentoring for CF teams. He helps run the Online ColdFusion Meetup (coldfusionmeetup.com, an online CF user group), is a contributor to the CF8 WACK books by Ben Forta, and is frequently invited to speak at developer conferences and user groups worldwide.
Reader Feedback: Page 1 of 1
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice: