We help IT Professionals succeed at work.

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.

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
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 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
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
The SQL below detects dupes or records with the same serial & lian numbers.

How can I add a remarks field - the serial & lian number would be embedded with other comments:
Remarks field example: 13 HP motor 2 week for delivery 45515-6656 (serial-lian)

Logic: If the serial & lian number match another record in the remarks field add to the dupecount

SELECT * , (select count(*) 
FROM    materials dupe
where  dupe.Serial = t.Serial
and    dupe.lian = t.lian
		   
		) AS DupeCount
from   materials t

Open in new window

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 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
Hi,
  I have CFM page that used to work just fine, but recently it is generating an error like this:
-------------------------------------------------------------------------------------
Invalid CFML construct found on line 28 at column 189.
ColdFusion was looking at the following text:  /"

The CFML compiler was processing:

An expression that began on line 28, column 179.
The expression might be missing an ending #, for example, #expr instead of #expr#.
The body of a CFMAIL tag beginning on line 20, column 10.
--------------------------------------------------------------------------------------------------

  Here is the statement that is failing.

<a href="https://www.sourcedomain.com/sports/event/050036DC?artistid=873854&majorcatid=10001&minorcatid=1&tm_link=browse_msg-0_0500535DD86A36DC#efeat4212">
<img border="0" src="http://www.mydomain.info/eimage/#Picture#" align="middle">
</a>

  I know it is the # sign that is the causing the problem, but I don't how how to fix this.

Thanks.
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
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
Hello Experts,

I am trying to install the CF updates and once I did the CF Admin is not accessible and is giving me 500 error and like to see where to start finding the issue.

I do have "detailed error message" is checked or selected on my IIS and my CFIDE folder exists as virtual directory.

Thanks and appreciate your response.
0
I need help coming up with the logic.

I have 2 classess that been purchased on the payment plan. (the payment plan options are: 4,6 ,9 payments plan).

Let say that course 1 was purchased on 4 payment plan option. The course is consists of 1 theoretical part and 7 practical .

When payment 1 is made no practical parts are released,
when payment 2 is posted 2 practical parts get open up
when payment 3 is posted 2 more practical parts open up
when payment 4 is posted 3 more  practical parts open up

Let say that course 2 was purchased on 4 payment plan option. The course is consists of 1 theoretical part and 3 practical .

When payment 1 is made no practical parts are released,
when payment 2 is posted 1 practical parts get open up
when payment 3 is posted 1 more practical parts open up
when payment 4 is posted 1 more  practical parts open up

Let say that course 3 was purchased on 6 payment plan option. The course is consists of 1 theoretical part and 7 practical .

When payment 1 is made no practical parts are released,
when payment 2 is posted 1 practical parts get open up
when payment 3 is posted 1 more practical parts open up
when payment 4 is posted 1 more  practical parts open up
when payment 5 is posted 2 more  practical parts open up
when payment 6  is posted 2 more  practical parts open up


and so on
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
>