Today, I've got problem because of messy of Microsoft Word comments in our database. It's because of our clients wrote some messages in MsWord and paste these into CFTextarea richtext data. That's why those data cannot be displayed at our project. It's my bad that I have not thought about how to prevent these kind of problems during project development.
Convert date format UDF
Dec 24
Today, I've created simple UDF for convert date format "dd/mm/yyyy" to "mm/dd/yyy". Because our clients want to use "dd/mm/yyyy" format as our national format into our projects. You may all know that it's very easy to convert but it's dedicated to those who start learning Coldfusion UDF.
As we all know if webservices of another party using window NT authentication, we cannot use CFInvoke for calling webservices. At that time, we need another 3rd party webservices integrator for coldfusion to access another party. At that time, we need to use CFObject instead of CFInvoke.
2<cfobject type=".NET" name="webServiceName" class="ViewUserLibrary.UserManagementService" assembly="C:\ViewUserLibrary.dll" />
3<!--- call webservices URL --->
4<cfset webServiceName.set_wsdl("http://10.168.7.71:8080/oaswebservices/OASWebSvcPatientMgmt.asmx?wsdl") />
5<!--- Window NT Username --->
6<cfset webServiceName.set_userId( "CTTT24" ) />
7<!--- Window NT Password --->
8<cfset webServiceName.set_password( "passwd78" ) />
9<!--- Window NT Domain --->
10<cfset webServiceName.set_domain( "CGHAD" ) />
11<cfset dataSetResult = webServiceName.viewUserInfo("CG","PPShein")/>
12
13<!--- Dump it --->
14<cfdump var="#dataSetResult#"/>
In my previous post (here to view), I've mentioned how to replace Javascript Alert box with CFMessageBox. Here again, to replace Javascript Confirm box with CFMessage.
2 var RandCount = Math.random();
3
4 ColdFusion.MessageBox.create(obj + RandCount, 'confirm', 'CESID', messageText, onfinish, {width:300, modal:true});
5 ColdFusion.MessageBox.show(obj + RandCount);
6}
CFIDE with multiple instance
Dec 23
Today I got the problem that I cannot use following sentence in one of my instance.
And hit JS error and don't know why. That's why I just go viewsource and found that CFIDE is missing for one of my CF instances. I cannot convince why Adobe cannot include CFIDE for multiple instances installation. That's why I know there is two ways to solve this bug of Coldfusion multiple instance installation.
Today, I've oddly found IncrementValue in Coldfusion. In my previous time, when I need to increase count in Coldfusion, I always use as follow.
2
3<!--- CFScript version --->
4<cfscript>
5 mycount++;
6</cfscript>
I'm now planning to take Coldfusion 9 exam for my career enhancement. Because I'm Adobe Certified Expert in Coldfusion 8 and I feel like myself to take Coldfusion 9 either. Some people will argue that certificates are not needed if you really know of it but for new career, it's needed. When I want to apply for new job, I'm not sure whether the new employer know I really know Coldfusion or not without having certificate.
Coldfusion 9 Exam Structure
- Programming fundamentals
- Working with the Application framework
- Interacting with databases
- Working with components
- Interacting with persistent components
- Working with XML
- Reusing code
- Interacting with remote systems
- Managing files
- Tuning application performance
- Building advanced user interfaces
- Reporting
Today I need to fetch data from *.csv (which has nearly 15,000 records) file and insert such data into our database. At that time, I need to consider how to retrieve data from this file and how to insert into our database. So, I need to consider which method I need to use between "looping in array" and "ListToArray". That's why I've wrote with "looping in array" first.
Here is simple list data including in CSV file.
2008|MIKE|MALE|ANDROID DEVELOPER
3009|RAYMON|MALE|APPLE DEVELOPER
These days I'm about to develop growth chart module for my current project enhancement. In this growth chart, I need to merge two chart series called area chart and bar chart to display patient percentile. In Coldfusion Chart, if we're trying to merge two chartseries, x-axis of both must be same records. If not, our chart might be displayed wrong data.
Here is my sample coding of CFChart.
2 format="png"
3 xaxistitle="Age (mth)"
4 yaxistitle="HEAD"
5 chartwidth="500"
6 chartheight="500"
7 gridlines="6"
8 showborder="no">
9 <cfchartseries
10 type="bar"
11 paintstyle = "light"
12 seriescolor="000000"
13 seriesLabel="Patient's Information">
14 <cfchartdata item="3" value="10">
15 </cfchartseries>
16 <cfoutput query="Getgrowth" group="PERCENTILE">
17 <cfset i = i + 1>
18 <cfset serColor = ListGetAt(ListCOLOR, i)>
19 <cfchartseries
20 type="area"
21 markerStyle="diamond"
22 seriescolor="#serColor#"
23 seriesLabel="#convertOrdinal(PERCENTILE)#">
24 <cfoutput><cfchartdata item="#AGE#" value="#GETDATA#"></cfoutput>
25 </cfchartseries>
26 </cfoutput>
27</cfchart>
Playing with CFThrow
Jul 19
Today, I found that cfthrow is very useful to me for error handling in my project. Because prior programmer of my current wrote some funny code for error handling without using cfthrow. I'm not sure whether they don't know cfthrow or not. Honestly, I didn't know most of Coldfusion Tags and functions before I took CF8 exam. When preparing for CF8 exam, I know most of tags and functions of CF8. Thanks, CF8 exam.
Ok, let's continue. Here is funny coding our prior programmer wrote.

Android
Top of Page