| This feed does not validate. (details) 18 Dec 08:26 Previously, I wrote about using a CFLOOP inside of a CFLOOP. Here's another solution for a quirky problem you might encounter. Sometimes a situation exists where you need to use a CFLOOP inside of a CFOUTPUT. I had two queries, the first was the main query (queryOneList), and the second (queryTwoList) was going to be used to dynamically create the columns in a table for an administration area. This is a pretty unique situation, and it created a unique problem. 27 Oct 09:16 I came across a stored procedure that returns data in the following format: The dilemma was how to display this so that each level was shown as a "sublevel" of the one above it. I easily accomplished this by keeping a list of the current levels. Each time a new level was added, I'd add this value to the "levelList". When that level was ended, I'd remove that value from "levelList". With this list, I would always know where I was. 27 Oct 07:33 My client has a stored procedure that was returning a column named "level". While trying to execute a query of queries on the resultset, I ran into some issues because "Level" is a reserved word in T-SQL. The stored proc simply returns a column aliased as "level". Its not actually that in the table, so this problem wasn't an issue previously. I was going to change the stored procedure itself, but other applications rely on the naming structure already in place. Any change would be a pain. 13 Oct 14:24 Problem: The xml document I was trying to invoke would sometimes return child nodes, and sometimes not. Since I would reference the values of the child nodes in my result set, I needed to first check to see if they existed. isDefined doesn't work with Xml documents, and I didn't want to convert it to another object type just for that. I could have tried to reference the child node with a try/catch around it and if it broke, then I knew it didn't exist. 5 Oct 05:25 I ran into a problem today and it turned out to be a simple naming conflict. I had a loop that was looping through a session variable. I had named the index "i", which is my default loop index name. Inside the loop was a structDelete command which wasn't working. After a bit of looking, I dug into the included file "act_ProcessFormVars.cfm" and found that there was a loop within it, that also used "i" for an index. 2 Oct 06:05 Pretty simple equation to show the last day of a month. First, get the first day of next month. Then we'll simply subtract one day from that new date. You could put this all into one long line, but I split it up for easier readability. 19 Sep 12:34 Here's something I came across today that I had never realized or seen before. I created a two dimensional array and filled it with data. Pretty much standard array practice, right? Well, I started thinking that sometimes its hard to remember which dimension of the array stores what values. So I started thinking about a more logical format I could use and came up with the following: Now each value in the array is holding a structure with two values, name and title. 17 Aug 10:12 Last night I went to Adobe's presentation of AIR - Adobe Integrated Runtime. I have to tell you, it was great going, and I'm very excited to see what new apps I can develop. Oh, and I met Ben Forta as well. Very cool guy. He basically got me started with coldFusion 10 years ago when I bought his first CFWACK book. Thanks Ben. http://www.adobe. 15 Aug 02:23 I made a very silly mistake today. I was putting my url and form variables into the request scope through the application.cfm file Next I had a form page, which was using the GET method to post the form (simplified below). On the form action page, I was referencing form.reportId, and it was bombing since it did not exist. In fact, the form scope did not exist at all! The values existed in the request scope, so what happened? 9 Aug 05:39 Error: null null The error occurred on line -1. Stack Trace: java.lang.NullPointerException I have come across these errors in the past and every single one of them is a result of a date function going awry. One example is a client of mine using a drop down box to "create" a date. They would have a drop down for the month, a drop down for the day (31 days), then one for the year. On the action page, this line of code exists: #CreateODBCDate(CreateDate(FORM.Year2,FORM.Month2,FORM. |