Remove MSWord comment in Coldfusion

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.

[More]

Convert date format UDF

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.

[More]

Webservices without using cfinvoke

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.

view plain print about
1<!--- Include .NET webservices DLL file --->
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#"/>

Replace Javascript Confirm box with CFMessagebox

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.

view plain print about
1function DisplayMessageConfirm (obj, messageText) {
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}

[More]

CFIDE with multiple instance

Today I got the problem that I cannot use following sentence in one of my instance.

view plain print about
1<cftextarea skin="silver" toolbar="Basic" richtext="true" name="body" required="true">

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.

[More]

IncrementValue in Coldfusion is useful

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.

view plain print about
1<cfset mycount = mycount + 1>
2
3<!--- CFScript version --->
4<cfscript>
5    mycount++;
6
</cfscript>

[More]

Coldfusion 9 exam preparation

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

[More]

ListToArray and Looping in Array

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.

view plain print about
1007|PPSHEIN|MALE|COLDFUSION DEVELOPER
2008|MIKE|MALE|ANDROID DEVELOPER
3009|RAYMON|MALE|APPLE DEVELOPER

[More]

Merge Area Chart and Bar Chart in Coldfusion

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.

view plain print about
1<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>

[More]

Playing with CFThrow

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.

[More]

More Entries

Top of Page