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

how do I reset where a CF Tag file is being pulled from within a cold fusion file?

debug is providing these filepaths:

Total Time Avg Time Count Template
0 ms 0 ms 1 D:/inetpub/wwwroot/CF_Tags/InetRightLinks.cfm
0 ms 0 ms 1 D:/inetpub/wwwroot/CF_Tags/InetTopLinks.cfm
0 ms 0 ms 1 D:/inetpub/wwwroot/bottomInet.cfm
0 ms 0 ms 1 D:/inetpub/wwwroot/centralinv/InetTopHierMenu.cfm
0 ms 0 ms 1 D:/inetpub/wwwroot/secure/CF_Tags/InetCGLinks.cfm
0 ms 0 ms 1 D:/inetpub/wwwroot/secure/InetDate.cfm
0 ms 0 ms 1 D:/inetpub/wwwroot/secure/InetLeftMenu.cfm
0 ms 0 ms 1 D:/inetpub/wwwroot/secure/payment.htm
0 ms   STARTUP, PARSING, COMPILING, LOADING, & SHUTDOWN
0 ms   TOTAL EXECUTION TIME


Within the file the CF_InetLeftMenus.cfm file for instance? What is directing the htm file, payment.htm in this case, to pull from that directory vs. the CF_tags file under inetpub or wwwroot. Any yes I know the CF-Tag file configuration is messed up. Old set up I had nothing to do with.

I'm assuming something needs to be modified w/in the CF admin panel but what?
0
Get expert help—faster!
LVL 12
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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
Excel report output for date format isn't working as it did w/in html:

Will this work with an excel output? I'm getting an error when I try to use it the same way See the enter_que output below:

<cfoutput> 

#cellbeg# Queue Name #cellend# #cellbeg# Fifo Flag #cellend# #cellbeg# User ID #cellend# #cellbeg# Due Date #cellend# #cellbeg# Document ID#cellend# #cellbeg# Invoice Number #cellend# #cellbeg# Material Amount #cellend# #cellbeg# Discount Terms Percent #cellend# #cellbeg# Discount Terms Days #cellend# #cellbeg# Discount Terms Net #cellend# #cellbeg# FINCENDT #cellend# #cellbeg# Markview #cellend# #cellbeg# Work Item #cellend# #cellbeg# Date Entered Queue #cellend# 

</cfoutput> </font>
</tr>

<cfoutput query="queueData">
#begline#
#cellbeg1# &nbsp;#queueData.queue_name# #cellend# #cellbeg1# &nbsp;#fifo_flag# #cellend# #cellbeg1# &nbsp;#RETRIEVING_USER_ID# #cellend# #cellbeg1# &nbsp;#queueData.due_date# #cellend# #cellbeg1# &nbsp;#queueData.document_id#  #cellend# #cellbeg1# &nbsp;#queueData.invoice_num# #cellend# #cellbeg1# &nbsp;#queueData.material_amount# #cellend# #cellbeg1# &nbsp;#queueData.percent#  #cellend# #cellbeg1# &nbsp;#queueData.days# #cellend# #cellbeg1# &nbsp;#queueData.net# #cellend# #cellbeg1# #queueData.FINCENDT# #cellend# #cellbeg1# #queueData.markview# #cellbeg1# #queueData.workitem#  #cellbeg1# #queueData.dateFormat(enter_que,"mm/dd/yyyy")# 
#endline#
</cfoutput> 

Open in new window

0
I am running a test in SpIDER WEB and it returns the following error message , How can I fix the error to avoid vulnerability
FireShot-Capture-1---Vulnerability-R.png
FireShot-Capture-4---Vulnerability-R.png
0
I'm having output issues with a cold fusion file using a sql query. The code for the file is:

<cfset today = DateFormat("#Now()#","mm/dd/yyyy")> 
<cfset time = TimeFormat("#Now()#","hh:mm:sstt")>
<cfset #dsn# = "prod1_r">
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>

<cfquery name="queueData" datasource="#dsn#">
Select 
     distinct q.queue_name, 
     INV.FIFO_FLAG, 
     WI.RETRIEVING_USER_ID,
       decode(TO_NUMBER(inv.discount_terms_days), null, 
              inv.document_receipt_date + inv.discount_terms_net, 0, 
              inv.document_receipt_date + inv.discount_terms_net, 
              inv.invoice_date + inv.discount_terms_days) due_date, 
       inv.document_id,
       inv.invoice_num, 
       inv.material_amount, 
       lpad(TO_NUMBER(inv.discount_terms_percentage),5,0) percent,
       TO_NUMBER(inv.discount_terms_days) days,
       TO_NUMBER(inv.discount_terms_net) net,
       TO_DATE(wpv.property_value,'DD-MON-YYYY')  FINCENDT,
       inv.markview_document_id markview,
       wi.workitem_instance_id workitem, 
       trunc(wi.enqueued_timestamp) Enter_que
  From sf_workitem_instance wi,
       sf_workitem_property_value wpv,
       wins_invoices inv,
       sf_queue q
where wi.queue_id = q.queue_id 
   and wpv.WORKITEM_INSTANCE_ID = wi.WORKITEM_INSTANCE_ID
   and inv.workitem_instance_id = wi.workitem_instance_id
   and wpv.WORKITEM_CLASS_PROPERTY_ID in (1046,187)
   and wi.queue_id not in (120,14,40)
   and q.queue_name <> 'Associated'

Open in new window

0
The attached file is throwing an error:

Error Executing Database Query.  
[Macromedia][Oracle JDBC Driver][Oracle]ORA-00911: invalid character  
 
The error occurred in D:/inetpub/wwwroot/23_Reports/23QueueStatusDetailRpt.cfm: line 28
 
26 : <cfset grandCount = 0>
27 :
28 : <cfquery name="queueData" datasource="#dsn#">
29 : Select
30 :      distinct q.queue_name,

I've attached the cfm file in .txt format

Does anyone see why this is being thrown? Its working in another report with a different query but I can't find why it's being thrown.

Thanks,
query23.txt
0
I've been tasked to use a report query to create a new report w/ a different query. The query is sql w/in a Cold Fusion file. I've attached 2 files. FYI - queue_status_report_01.cfm is the file which is currently working w/o issue. The next file is queue_status_report_02.cfm, which has the new query added but nothing else.

My issue is with the output and the params for this. Which do I need to keep? Which do I need to pull...I'm sorry for the lengthy explanation but I'm looking for some guidance on what's being used that I can reuse with the old version to get the new version up and running.

Thanks for any help.

Quack
queue_status_report_01.txt
0
I need help with understanding a sql select statement. I'm new to sql and learning but I'm not sure what the select statement is trying to output with the decode_TO NUMBER code See below for the example:

Select distinct q.queue_name, 
		INV.FIFO_FLAG, 
        WI.RETRIEVING_USER_ID,
       decode(TO_NUMBER(inv.discount_terms_days), null, 
              inv.document_receipt_date + inv.discount_terms_net, 0, 
              inv.document_receipt_date + inv.discount_terms_net, 
              inv.invoice_date + inv.discount_terms_days) due_date, 
       inv.document_id,
       inv.invoice_num, inv.material_amount, 
       lpad(TO_NUMBER(inv.discount_terms_percentage),5,0) percent,
       TO_NUMBER(inv.discount_terms_days) days,
       TO_NUMBER(inv.discount_terms_net) net,
       TO_DATE(wpv.property_value,'DD-MON-YYYY')  FINCENDT,
       inv.markview_document_id markview,
       wi.workitem_instance_id workitem, 
       trunc(wi.enqueued_timestamp) Enter_que

Open in new window


What would the output be for each of these be? I get the Queue Name, FIFO Flag, User ID  but not sure about what's being requested for that section.
0
I have a report that I need to run after selecting an HTML or Excel option then after hitting submit the report would run automatically and pull up the queried results from a sql query. I'm having issues getting the report to automatically run after hitting the next button. Below is the code I'm using to go to the next page:

												    <cfform name="form1" method="post" action="html.htm">
													
                                                   <tr>
                                                   <cfselect name="test">											  
                                                     <option name="html" type="radio" value="html">
                                                     HTML
                                                     </option>
                                                     <option name="excel" type="radio" value="excel">
                                                     Excel
                                                     </option>                                                  
                                                     </cfselect>
                                                   </tr>                                      
                                                      
                                                   <tr>
                                                      <td colspan="3" class="maintxt12">
                                                        <input type="submit" 

Open in new window

0
This is my Piece of code:
      // Procedure to get results
     <cfquery name="ExportData" datasource="#session.DataSource#">
                  EXEC xxx 6, #yy#,'#Dateformat(now(),'mm/dd/yyyy')#','#StartDate#', '#EndDate#', #rx#, NULL
   </cfquery>

This procedure gives the result set more than 1 lakh records.From this I formed the 'QoQ' from the above procedure.

'Query of Queries to get result set'

   <cfquery name="Residents" dbType="query">
                  SELECT ContactID, State, Location, Name, MIDate, MODate, MoveOutReason, MovedToDesc, DateOfBirth, Race, Gender, FirstTotalPts, LastTotalPts
                  FROM ExportData
                  WHERE SectionIND = 'Residents'
            </cfquery>

    <cffunction name="QueriesToXLS" access="public">
    <cfargument name="queryArr" required="true" /><!--- An Array of Query Objects --->
    <cfargument name="sheetNameArr" required="false" /><!--- Optional sheet names to use instead of "Sheet1","Sheet2",... --->
    <cfset tempPath = GetTempDirectory() & CreateUuid() & ".xlsx" /><!--- Creaete a Temp XLS File --->
    <cfset counter = 1 />
    <cfloop array="#ARGUMENTS.queryArr#" index="i">
        <cfset sheetName = "Sheet#counter#" />
         <cfif isDefined("ARGUMENTS.sheetNameArr")>
            <cfset sheetName = ARGUMENTS.sheetNameArr[counter] />
        </cfif>
        <cfspreadsheet action="update" filename="#tempPath#" query="i" sheetName="#sheetName#" />
        <cfset counter += 1 />
    </cfloop>
    <cfreturn SpreadsheetRead(tempPath) />
    …
0
Free Tool: SSL Checker
LVL 12
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I am running a test in SpIDER WEB and it returns the following error message , How can I fixe the error to avoid volnuarability

Attack Type  - double Quote (double ASCII)
Original value - page
Attack Value - page%25%22
Error : Select folio ,pgname,name
from tbl
where upper(pgname) = '1B'</font><td></tr></
0
Hi,

What account does CF use when applying hotfixes? I have it locked down and may have limited the access a bit too much.  Tried to apply HF 13 and got the following:

Moving files failed:
                          Status: FATAL ERROR
                          Additional Notes: FATAL ERROR - Could not move the file <root folder>\lib\updates\chf11000012.jar to the backup location d:\wwcf\cfusion\hf-updates\hf-11-00013\backup\lib\updates\chf11000012.jar

Moving files failed:
                          Status: FATAL ERROR
                          Additional Notes: FATAL ERROR - Could not move the file <root folder>\lib/xmpcoreold.jar to the backup location <root folder>\hf-updates\hf-11-00013\backup/lib/xmpcoreold.jar

Moving files failed:
                          Status: FATAL ERROR
                          Additional Notes: FATAL ERROR - Could not move the file <root folder>\lib/nekohtml.jar to the backup location <root folder>\hf-updates\hf-11-00013\backup/lib/nekohtml.jar

Moving files failed:
                          Status: FATAL ERROR
                          Additional Notes: FATAL ERROR - Could not move the file <root folder>\lib/antisamy-1.5.3.jar to the backup location <root folder>\hf-updates\hf-11-00013\backup/lib/antisamy-1.5.3.jar

Failed to delete directory
                          Status: ERROR
                          Additional Notes: ERROR - Failed to delete directory:<root folder>/lib/xmpcoreold.jar
                            …
0
I have a table called myUsers with 1000 UserID's.  This table is the result of a query.  

I have another table called EmailSent that records every email sent to a UserID and which EmailTemplate was used.

How do I get the subset of those 1000 myUsers that have not yet received  EmailTemplate = "Template1.cfm"

This is so I can send the remainder of the UserIDs, the email.

I could do this with spaghetti code but prefer to do it within a CFquery tag.
0
Hi,

How do I join these two databases?

db1: Visitors
Table: Users
This table contains all users on the system.  each one has a unique "UserID"


db2:  PT_UserData
Table: Client_Scores
This table contains only those users who have completed a test
If they complete a test, the field "YourType" IS NOT NULL
All rows contain the field "UserID"


Both tables have "UserID" in common

I'm looking to output those users who have completed the test, but I need their Email and LastName which is in the Users table
0
Queries that use a join always baffle me so I could use some expert advice. Thanks in advance...

How to I write a ColdFusion query where:

I have one database called "Visitors"

I have 2 tables in that database:
"Users" is a table with my entire membership listing
"EmailSent" is a table listing every newsletter sent to each member

The common field is "UserID"

Within EmailSent is a field called "TemplateUsed" which is a different template for each version of the newsletter.

I need a query that will output the UserID's of those members who did not yet receive a particular template called "ImportedCareerCoach5.cfm"

But they may have received other newsletters.

Hope that makes sense.

 I'm running CF 10 and MS SQL
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
I have a database that has a URL field. The URL's can be different. This is what i currently have but nothing launches when i click on a row.
Thoughts?
<cfform name="video" format="html" align="center">
	<cfgrid name="videolist" query="videos" format="html" autowidth="no" selectmode="ROW" onchange="getURL('https://youtube.com/watch?='videolist.selectedItem.path, '_blank')">
		<cfgridcolumn name="vidname" header="Video Name" display="Yes" width="150"></cfgridcolumn>
		<cfgridcolumn name="software" header="Software" display="Yes" width="100"></cfgridcolumn>
		<cfgridcolumn name="keywords" header="Tags" display="Yes" width="300"></cfgridcolumn>
		<cfgridcolumn name="vidnumber" header="Number" display="Yes" width="100"></cfgridcolumn>
		<cfgridcolumn name="path" header="Location" display="Yes" width="300" ></cfgridcolumn>
		<cfgridcolumn name="dateadded" header="Date Entered" display="Yes" width="100"></cfgridcolumn>
	</cfgrid>
</cfform>

Open in new window

0
I have a SQL statement that detects dupes, how can I use this statement to supply my IFrame link from my query results to display the dupe record?

SQL Statement:
SELECT * , (select count(*) 
FROM    materials dupe
where  dupe.Serial = t.Serial
and    dupe.ian = t.ian
		   
		) AS DupeCount
from   materials t	

Open in new window

     

Query results statement that I need to modify to display the dupe record:
(Searchpup.cfm should display the duplicate record (where serial & ian = another record))
<a href="Search.cfm?UIC=#UIC#&IAN=#IAN#&SERIAL=#SERIAL#" data-record-number="Searchpup.cfm?id=#keyID#" target="_blank" class="classToDisplayPopupHover"><font size=2><STRONG>#UIC#-#IAN#-#SERIAL#</strong></font></a>

Open in new window

0
I had this question after viewing Getting data within a CFLOOP.

Hell again!! I wanted to try to expand on a functionality that I was helped with on here, and hopefully it will be a simple oversight on my part, but I wanted to get all of the records for one project and have those records placed in a textarea box, and that works great. But I also want to have a second textarea box that only shows the most recent comment per project number, and that textarea box will be modifiable, so a user can change the change inside that single comment on that textarea box. The code I have is below, but I can't seem to get the query right to get the single record for one textarea, while also getting all records for the other textarea.

<CFQUERY DATASOURCE="PDBARMYDEV" NAME="CecomInput">
 SELECT current_bulk_filter.proj_no,
current_bulk_filter.capces_location,
current_bulk_filter.capces_state,
current_bulk_filter.capces_description,
capces_support_history.proj_closed_reason

 FROM   mca.current_bulk_filter
   
left join mca.capces_support_history
on current_bulk_filter.proj_no = capces_support_history.proj_no  

where capces_support_history.proj_closed_reason is not null      
 order by current_bulk_filter.proj_no asc
</CFQUERY>



<cfoutput query="CecomInput" group="proj_no">
       <!--- This will print once for every project --->
       proj_no = #proj_no#<br>
       …
0
The 14th Annual Expert Award Winners
LVL 7
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Good Morning!! I was hoping to get a little help with a query, and ultimate ColdFusion output. I have data in two tables and I use a CFLOOP to display project numbers and associated data from these tables. The query is below:

<CFQUERY DATASOURCE="PDBARMYDEV" NAME="CecomInput">
SELECT current_bulk_filter.proj_no,
       current_bulk_filter.capces_location,
       current_bulk_filter.capces_state,
       current_bulk_filter.capces_description,
       capces_support_history.proj_closed_reason

FROM   mca.current_bulk_filter
 
  left join mca.capces_support_history
        on current_bulk_filter.proj_no = capces_support_history.proj_no  

        where capces_support_history.proj_closed_reason is not null      
order by current_bulk_filter.proj_no asc
       </CFQUERY>

The problem I'm having is capces_support_history table. This table could have several rows for each individual project number. What I would like is to be able to have a textarea with all of the comments for each project number in one box. Right now its only picking up the latest record. But I would like the textarea to have all of the comments listed for each project. I guess kinda like a loop within a loop?? Any help would be greatly appreciated
0
Hi,

I have CF 11 on a production Windows Server 2008 R2.  I cloned it and upgraded it to Windows 2012 Standard, which appeared to leave things intact (at least I can bring up the CF Admin site).  I then upgraded that to Windows 2016 Standard and check the CF Admin again.  Still can get to it.

That said, am I asking for trouble running CF 11 on Windows 2016 Standard?  One of my developers indicated there were some compatibility issues.

Thanks!

--Ben
0
I have a searchable database producing a list of records that matches the criteria the user inputted. How can I turn the results of a specific field red if a dupe is detected?

Database Fields:
Serial     MFGNo

Logic: If Serial & MFGNo match with another record display red text.
0
I'm running SQL Server 2012.. .wondering if anyone has seen any procedures of functions for doing Monte Carlo simulations on financial data such as the stock markets.

Seems there may be a function in 2016, but we're not there yet.

Anyone have experience in this area?
Thank you!

(I'm also using Coldfusion if there is something there too)
0
ColdFusion cfpdf Thumbnail numbering is incorrect

I am using the cfpdf function in ColdFusion to create a document packet, i.e. merging a range of documents into one PDF file. The merge works correctly and the thumbnail images correctly link to their respective pages. However, the page numbers shown underneath the thumbnail images are incorrect. At some point in the process, the numbering is restarted as can be seen in the image below:

Thumbnail Images Renumbering Screenshot
This issue only occurs when the cfpdf function is given a directory to work with, not when the files are specified individually. Due to the potentially large number of files which may be processed, specifying the files individually would be impractical.

The version of ColdFusion I am using is 11.

Has anyone else here experienced this issue or has any remedial suggestions?

Thank you in advance.

The code I am using is:

    <cfpdf action="merge" 
    	directory="C:\temp" 
    	destination="Packet.pdf"
    	order="name" 
    	ascending="yes"
    	overwrite="yes"
     	keepbookmark="yes">

Open in new window

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

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.