ColdFusion Language

10K

Solutions

3K

Contributors

ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

Share tech news, updates, or what's on your mind.

Sign up to Post

In Oracle fusion, using HCM is it possible to mass assign a role/roles to existing user accounts? I know you can update elements in the Person Record, but was looking at the roles. which is previous versions of oracle might be referred to as 'responsibilities'.

I can do this manually, locate user record and then add the role, but it is time consuming to recall each user and assign the role manually. Would like to find a way I can do this en mass for non auto provisioned roles.

I've scoured google for examples/literature but there is not much there for a novice like me. Any information be gratefully received.
0
Amazon Web Services
LVL 13
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

I have JSON type data stored in a column in a SQL Table (Microsoft SQL).  I would like to be able to extract each element.
DATA:
{"amount":"0.52","invoiceNumber":"212265","result":"APPROVAL","txnId":"160119E3C-39EC4068-0571-41CC-9146-4FFCE637C30B","approvalCode":"060507","txnTime":"01/16/2019 01:14:00 PM"}

Is there a way to write a query that would extract the invoiceNumber, amount, and approvalCode Values easily?

Thanks
0
CFGridUpdate will allow me to delete a row in my database but wont allow me to insert a new row or update and existing row. What am I missing?

<cfquery datasource="projects" name="entirelist">
	Select TOP 20 * from tbl_project  
	order by id desc
</cfquery>
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Project Data Input</title>
</head>
<cfinclude template="header.html"/>
<body bgcolor="ffffff" topmargin="2">
&nbsp:
	
<table width="1000" align="center">
    <td>
		<cfform action="forms/action_projectlistupdate.cfm">

				<cfgrid name="projectlist" insert="Yes" delete="Yes" format="html" query="entirelist" selectmode="edit" autowidth="yes" insertbutton="Insert Row" deletebutton="Delete Selected Row" colheaderbold="Yes">
					<cfgridcolumn name="id" header="ID" display="No">
					<cfgridcolumn name="proj_num" header="Project Number">
					<cfgridcolumn name="orig_proj_num" header="Orig. Project Number">
					<cfgridcolumn name="proj_name" header="Project Name">
					<cfgridcolumn name="client_name" header="Client Name">
					<cfgridcolumn name="partner_charge" header="Partner in Charge">
                    <cfgridcolumn name="notes" header="Notes">
				</cfgrid>
			<cfinput type="submit" value="Update" name="gridEntered">	
		</cfform>	
	</td>
</table>
</body>
</html>

Open in new window


<cfif IsDefined("form.gridEntered") is True>
	<cfgridupdate grid="projectlist" dataSource ="projects" keyonly="No" tableName ="TBL_PROJECT"> 
</cfif>
 <cflocation url="../ProjectInput1.cfm"/>

Open in new window

0
I'm trying to use jQuery UI's "sortable" with Ajax. I have a test table With the columns ID (the auto-incrementing ID), sampleText (like "test item 1", "test item 2" etc.) and displayOrder which, theoretically, is an integer for the order the item should be displayed in. My code gets the information from the database and loops over it. When I drag and drop or use the up/down arrows, DevTools shows that the appropriate URL is being pinged but the table isn't updating and I'm not getting an alert (that the attempt was successful/there was an error.) This is the code for the page:

<cfquery name="qGetStuffToOrder" datasource="#APPLICATION.ds#">
	SELECT * FROM test_reordering 
	ORDER BY  displayOrder
</cfquery>
<table class="table table-striped">
	<tbody id="tabledivbody">
		<cfoutput query="qGetStuffToOrder">
		<tr class="sectionsid" id="sectionsid_#ID#">
			<td>#sampleText#</td>
			<cfif CurrentRow NEQ recordCount>
				<td><a href="javascript:void(0)" class="movedownlink"> <span class="glyphicon glyphicon-arrow-down">down</span></a></td>
			</cfif>
			<cfif CurrentRow NEQ 1>
				<td><a href="javascript:void(0)" class="moveuplink" > <span class="glyphicon glyphicon-arrow-up">up</span></a></td>
			</cfif>
		</tr>
		</cfoutput>
	</tbody>
</table>
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script> 
<script>
		 $("#tabledivbody").sortable({
        items: 

Open in new window

0
When using ExpandPath, I will occasionally get something unexpected. For instance, I'm trying to move a file from one directory to another.
<cffile action="MOVE" source="#ExpandPath('/tmp/bloop.jpg')#" destination="#ExpandPath('/final-images/bloop.jpg')#">

Open in new window


This is the error I'm receiving:
An exception occurred when performing a file operation moving a file to another filesystem on files /var/www/vhosts/[sitename].com/tmp/bloop.jpg and /opt/coldfusion10/cfusion/bin/redirect:/final-images/bloop.jpg.The cause of this exception was: java.io.FileNotFoundException: /opt/coldfusion10/cfusion/bin/redirect:/final-images/bloop.jpg (No such file or directory).

You'll notice that the expanded base of the source is /var/www/vhosts/[sitename].com (which is what you'd expect it to be) while that of the destination is /opt/coldfusion10/cfusion/bin/redirect:

What's going on here? This isn't the first time I've run across this issue, but I can't seem to Google anything up about it. We're running CF10 on a Linux server. Thanks!
0
I have the below code sample and need to confirm the correct usage of CFTRANSACTION  and that a variable newID is being called to correctly:

<CFTRANSACTION>
<CFQUERY name="newID" datasource="#dsn#">
SELECT MAX(ID) + 1 AS newid FROM TLAApprovers
</CFQUERY>
 
<CFIF newID.recordcount is 0>
<CFSET newid2 = 0>
<CFELSE>
<CFSET newid2 = newID.newid >
</CFIF>

<cfquery name="updateMain" datasource="#dsn#">
Insert INTO TLAApprovers (ID, Name, Unit, ApproverEmail, Status)
Values ('#newid2#', '#form.Name#', '#form.unit#', '#form.ApproverEmail#', '#form.status#')
</cfquery>
</CFTRANSACTION>

Open in new window

0
After upgrade from CF2016 to CF2018 getting "connection refused" error on open CSV file. SQL Server 2012. Windows Server 2012
It is working with CF2016 but not CF2018

     HTML Code Format  <PRE>Error Executing Database Query. [Macromedia][SequeLink JDBC Driver]TCP/IP error, connection refused. &lt;br&gt;The error occurred on line 40.</PRE> 

Open in new window


<cfset FilePath = "C:\home\mywebsite\wwwroot\test\countrycodeToDialcode.csv">
             <cfquery name="GetInternationalDialcode" datasource="dialCodes"
             cachedWithin = "#CreateTimeSpan(1, 0, 0, 0)#">
                           SELECT *
                           FROM #filePath#
             </cfquery>

Open in new window

0
I manage a bunch of websites that mostly use Coldfusion. Each website is located in its own directory on the server and they all use the same version of the code and they each have their own database. I am trying to figure out what is the best way to update all of the sites when I make a change to the code. Right now I have created a directory on the server that contains the changed files and then I use directoryCopy to copy over the new files. My code looks something like the following:
<cfset temp = directoryCopy("_UpgradeCode","website_to_update_directory/",true,"*.*")>

Open in new window


One issue that I have is that I don't know if there were any problems copying over the code.

Can anyone suggest a better way to update websites? I am hoping that this can be done in an automated way so that I can just call a function or something and then it automatically updates all of the sites. I have created a list of sites to update that can be passed to the function.

Thank you for any help that you can provide about this.
0
I have a form that allows for multiple file uploads using the "multiple" attribute on an input type="file" field. The results are being passed to a cfc that should upload the files, resize them, crop them for thumbnails, etc.

I have the photoUpload argument of the cfc (the name of my field being photoUpload) set to type=any, because if you upload a single file it's passed as a string while multiple files are passed as an array. My question is how to tell the code that comes after if there's one file or many. Should I test to see if photoUpload is a simple value, then if it is do ListToArray and just "loop" over the one? Or is there a better way to handle this before it even gets to the cfc?

Additionally, when I loop over the array it's always giving me the last file name as the name, causing overwrite issues. Can you tell where I'm going wrong? (Ignore all the CFCATCH messages being returned with the message, that's just for my own troubleshooting.) It's similar to this question but she had multiple fields and loops.

<cfif IsSimpleValue(ARGUMENTS.photoUpload)>
			<cfset photoArray = ListToArray(photoUpload)>
		<cfelse>
			<cfset photoArray = ARGUMENTS.photoUpload>
		</cfif>
<!--- upload image(s) --->
		<cfloop from="1" to="#ArrayLen(photoArray)#" index="i">
			<cftry>
				<cffile action="upload" 

Open in new window

0
MacOS Sierra plug-in configuration a qualified success.  However, I have no CFB perspective.
Install log says:
Installation: Successful with errors.
 
6454 Successes
0 Warnings
2 NonFatalErrors
0 FatalErrors
 
Non fatal errors being two occurrences of
Modify Text File - Single File:   /Users/barrygbrunning/eclipse/java-oxygen/Eclipse.app/Contents/Eclipse/Eclipse.app/Conten ts/Info.plist
                          Status: ERROR
                          Additional Notes: ERROR - Unable to locate ASCII text file to be manipulated. Deferring...
 
Indeed there is no such file, whereas there is a file /Users/barrygbrunning/eclipse/java-oxygen/Eclipse.app/Contents/Info.plist.  At the install log errors referenced path /Users/barrygbrunning/eclipse/java-oxygen/Eclipse.app/Contents/Eclipse/ are located folders: configuration, droppins, features, jre, plugins, readme and the eclipse.ini file, but no info.plist.
 
The implied "Deferring..." action seems to have not happened.  Any suggestions as to what I might do to recover the situation?  What should have happened to an info.plist somewhere? How might I get the CFB perspective to manifest in Eclipse?

Adobe_ColdFusion_Builder_2016_Instal.log
 
Any help will be greatly appreciated.  Thank you.
0
JavaScript Best Practices
LVL 13
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

I am trying to convert some coldfusion code to jsp and there are some tags like cfargument,cf:loop,cf:return,cf:location.. can anybody tell me what to use in place of these tags in jsp?
0
I have a search (with drop downs and input boxes) and results page using ColdFusion and Access. Displayed on the results is a link to a new search page with some criteria automatically filled for the user, and will click on the submit button to view the results.

Note: the search and results are on one page of code

How can I alter my link to automatically submit to view the results in lieu of having the user click submit?
Link code:
<a href="Search.cfm?RE=#RE#&JU=#JU#&SE=#SE#" target="_blank" ><font size=3>#RE#-#JU#-#SE#</font></a>

Open in new window

0
I am trying to create a simple HTML table and for some reason the columns in the header are not the same width has in the body. My code looks like:
	<table class="table AdTableStyle1 ManageSched" id="UserSchedule" border="1" cellpadding="4" cellspacing="0">
		<thead>
			<tr>
				<th >Day</th>
				<th >Date <span style="font-size:10px">(mm/dd/yyyy)</span></th>
				<th >Start Time</th>
				<th >End Time</th>
			</tr>
		</thead>
		<tbody>
			<cfloop index="thisRow" from="1" to="#arrayLen(sched.data)#">
				<cfoutput><tr>
					<td>#sched.data[thisRow].day#</td>
					<td>#sched.data[thisRow].date#</td>
					<td>#sched.data[thisRow].starttime#</td>
					<td>#sched.data[thisRow].endtime#</td>
				</tr></cfoutput>
			</cfloop>
		</tbody>

	</table>

Open in new window

Capture.PNG
0
Hi

We have a computer with Coldfusion on running website on a localhost. I tried to add a new website but by doing this I now cant connect to any local website.

I've clearly done something wrong but I dont know how to fix it.

Can anyone guide me into a repair

Thanks
Mark
0
CFGRID runs into JSON Parse error while fetching data. However, sometimes 20K records come back in the grid while at other times, the error would display for 700 records.
0
In a.cfm I have:
<CFSET VerObj = New cfcomponents.VerFold.Ver_Users()>
<CFSET VerObj.Functiion_1(userid)>

In the next few template, c.cfm, I need to call a different function within Ver_Users.cfc I can do the same thing:
<CFSET VerObj = New cfcomponents.VerFold.Ver_Users()>
<CFSET VerObj.Function_2(userid)>

If I need to call the same cfc again from yet another template down the road and I keep doing this I think it is very awkward and repetitive? the purpose of using .cfc is so that I can reuse or call the functions by just doing:

<CFSET VerObj,Function_1()> or
<CFSET VerObj,Function_2()>

from anywhere without keep instantiating the cfc, am I correct? is there any example on how I can accomplish This?
0
Has anyone implemented SAML 2 using Coldfusion?

We would be the service provider and the identity provider for a single sign-on (SSO).

Seeking any sample code, CFC or anything to help jump start the project!

Thanks
0
The following script is producing invoices.  It was working fine in 4.5, but my server has upgraded to CF 7.0.  The first invoice is produced, and then I encounter the error,  I have removed all addresses from the database except for the 20 or so valid ones from people who bid in the auction.  I am not a CF expert, and I am freaking out a little bit.

Here is the code:

<html>

<head>
<title>SEND INVOICES</title>
</head>

<body BGCOLOR="#FFFFFF">

<CFIF ParameterExists(ID) IS "NO"><CFSET ID=0></CFIF>
<CFIF ParameterExists(PASS) IS "NO"><CFSET PASS=0></CFIF>
<CFQUERY name="validate" DATASOURCE="DJS">SELECT * FROM ADMIN WHERE ID='#ID#' AND PASS='#PASS#'</CFQUERY>
<CFIF VALIDATE.RECORDCOUNT is 0><CFLOCATION URL="ERROR.CFM?ERROR=2"></CFIF>

<CFQUERY name="checkclose" datasource="DJS">select * from times where type='auction'</cfquery>
<CFIF #checkclose.enddate# LT #CreateODBCDateTIME(now())#>
<CFQUERY NAME="AUCTIONINFO" DATASOURCE="DJS" MAXROWS="1">SELECT * FROM TIMES</CFQUERY>

<CFQUERY NAME="lots" DATASOURCE="DJS">SELECT * FROM lots ORDER BY lot ASC</CFQUERY>

<CFLOOP QUERY="lots">

<CFQUERY name="highbidder" datasource="DJS" maxrows="1">SELECT * FROM bids WHERE lot = #lot# ORDER BY bid DESC</CFQUERY>

<CFIF HIGHBIDDER.RECORDCOUNT IS NOT 0>

<CFQUERY NAME="HBI" DATASOURCE="DJS" MAXROWS="1">SELECT * FROM MEMBERS WHERE MEMBERID='#HIGHBIDDER.MEMBERID#'</CFQUERY>

<CFQUERY NAME="CHECKTABLE" DATASOURCE="DJS" MAXROWS="1">SELECT * FROM WINTABLE WHERE …
0
Hi,
I currently use a cfdiv to bind to a data file (data.cfm).
This data.cfm file simply creates a CFquery and a html Table..

When I use ColdFusion.Navigate I can refresh the above div (called div1) easily.

However I have changed m CfDiv into a std html div and I am trying to use the $ajax.load function to reload the div.

I believe my calling code is correct.

 $('#div1').load('data.cfm?id=100');

However it seems jquery just ignores the server side code in my data.cfm file.
If I makes a blank data.cfm with a few lines of html the do refresh ok.

But not my data.cfm with what I need.
cfquery and cfoutput & table.

Any help would be appreciated..
0
Exploring ASP.NET Core: Fundamentals
LVL 13
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

I'm trying to integrate a coldfusion app with MS sharepoint. Both sites are within the intranet so it shouldn't be anything network related. I'm able to browse to the wsdl file from a browser but the cfsharepoint tag part gives following error:

Unable to read WSDL from URL: https://nri.pcd.com/books/authors/_vti_bin/Lists.asmx?wsdl.

***********************************************************************************
Here's my cf code snippet:
***********************************************************************************
<cfscript>
      login = {domain="https://nri.pcd.com",
      username="uname", password="pwd"};
</cfscript>

<cfoutput>
      
            <cfsharepoint action="getlistcollection"
                  wsdl="https://nri.pcd.com/books/authors/_vti_bin/Lists.asmx?wsdl"
                  login="#login#"      name="result">
</cfoutput>

<cfdump var="#result#">
0
I have a JSON feed which dumps a Facebook Page timeline feed. For some reason, Facebook allows a linked URL to be part of the actual message that is sent via JSON. So if I had a FB post that included a link to a Youtube video, it comes through the JSON feed like

'check out my cool new video http://www.youtube.com/myvideoid'

I'd prefer to strip out the url string from the JSON result and have it just give me

'check out my cool new video'

I know this has something to do with ReFindNoCase() or another similar thing, but I don't know how to write the code to strip it out and just leave me the message without the long url string.
0
Currently we are migrating from coldfusion 6 to coldfusion 2016.

<cfloop index="RSG004_i" from="1" to="#RSG004_dt.num#" step="1">

I want you to tell me how to deal with this error.
Thank you.
0
We are looking to upgrade our coldfusion server (v 6.1) running server (2003) to a new server (server 2012) and ColdFusion 2016.

Looking for a solution/upgrade path.. If I need to upgrade first to a lower version.

If its not semi simple then possibly moving to another dev language.

Thanks in advance!
0
I've been using  sys-con.com's code in my Application.cfc file to check for malicious input through FORM and URL variables, but I'm running into issues with hyphenated variable names (specifically Google's reCAPTCHA.) This is the code I use:

<cfloop collection="#form#" item="formelement">
    <cfif isSimpleValue(evaluate(formelement)) AND refindnocase(sqlregex, "#evaluate(formelement)#")>
        <cflocation url="messages.cfm?message=invalid">
        <cfset StructClear(form)>
	<cfabort>
    </cfif>
</cfloop>

Open in new window


And this is the error I'm receiving:

Variable G is undefined.

Which makes sense, because it's looking at g-recaptcha-response. What do I need to do to my code to allow it to accept hyphenated variable names?

Thanks!
0
i m not able to access ColdFusion pages and admin page in our application. It is throwing 500 error with ROOT CAUSE:
coldfusion.server.ServiceFactory$ServiceNotAvailableException: The Debugging service is not available.

I m getting below info in the logs when starting CF server. We are using CF9 on unix server. Please help.

04/26 05:02:19 Information [main] - Starting scheduler...
04/26 05:02:19 Information [main] - Starting WatchService...
04/26 05:02:19 Information [main] - Starting debugging...
coldfusion.server.ParsingConfigFileException: [/export/home/web3b2/coldfusion/coldfusion9/lib/neo-debug.xml]coldfusion.wddx.WddxDeserializationException: WDDX packet parse error at line -1, column -1. Premature end of file..
      at coldfusion.server.ServiceBase.doDeserialize(ServiceBase.java:151)
      at coldfusion.server.ServiceBase.access$000(ServiceBase.java:37)


04/26 05:02:19 Error [main] - Unable to initialize Debugging service: coldfusion.server.ServiceException: [/export/home/web3b2/coldfusion/coldfusion9/lib/neo-debug.xml]coldfusion.wddx.WddxDeserializationException: WDDX packet parse error at line -1, column -1. Premature end of file..
0

ColdFusion Language

10K

Solutions

3K

Contributors

ColdFusion is a server-side rapid application development platform originally created by Allaire and now sold by Adobe, implementing the dynamic general purpose CFML programming language. The term ColdFusion is sometimes colloquially used to refer to the CFML language (Cold Fusion Markup Language), but can also include discussions of the server software implementation. ColdFusion runs using a customised version of Apache Tomcat. Earlier versions are bundled with JRun.

Top Experts In
ColdFusion Language
<
Monthly
>