Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x

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

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
Free Tool: IP Lookup
LVL 11
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

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 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
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
[Webinar On Demand] Database Backup and Recovery
LVL 11
[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

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
I am trying to send text message througth Coldfusion to a people phones and I am suing cfmail tag,. The text is going fine. The question is Is there a way to send a text message as a notification so it stays on the phone as a notofication . Without person needed to go to their messages and check for incoming messages
0
I am trying to integrate my coldfusion pages into  a 'responsive'  navigational bar (eg bootstrap template from W3schools). Below is the result of my efforts in trying to use one of these templates.   The  page code I created is below and also a link to the server so you can see the result.

The result suggests that the template I am using does not fully support coldfusion OR I am not using the correct approach in building in the coldfusion pointers to the nav template.

I am asking the following questions

-  Am I doing something stupid in the example I have included - if so, can you give me a pointer as to what the solution is
-  What are your recommendations for building a responsive Nav bar which will support coldfusion.


Many thanks,

james





<title>Untitled Document</title>
<meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
</head>

<body>
<div class="container background">
  <div class="row">

    <h1>ABAC INSCRIPTION 2019</h1>
<nav class="navbar navbar-inverse">
    <div class="container-fluid ">
      <ul class="nav navbar-nav">
        
        <li><a href="#tab2" data-toggle="tab">Programme 

Open in new window

0
I have a bootstrap login popup. Upon login into the system throught the bootstrap popup I need to redirtect the client to either myAccount page or myCart page.

		$('#login-form').bootstrapValidator({
			message: 'This value is required',
			submitButton: '$login-form button[type="submit"]',
			live: 'enabled',
			
        	
        	 feedbackIcons: {
	            valid: 'glyphicon glyphicon-ok',
	            invalid: 'glyphicon glyphicon-remove',
	            validating: 'glyphicon glyphicon-refresh'
	        },
	        
	        fields: {

            username: {
            	group: 'col-sm-2',
                message: 'The username is not valid',
                validators: {
                    notEmpty: {
                        message: 'The username is required and can\'t be empty'
                    },
                    stringLength: {
                        min: 2,
                        max: 30,
                        message: 'The username must be more than 2 and less than 30 characters long'
                    }
                   
                }
            },

            loginPassword: {
            	group: 'col-sm-2',
                validators: {
                    notEmpty: {
                        message: 'The password is required and can\'t be empty'
                    }
                   
                }
            }
            }
        }).on('success.form.bv', function(e) {
     // alert(100)
        // Prevent form 

Open in new window

0
Hi

Using ColdFusion, what is the easiest way to find links like the one below in a web page, and removing the tag so its no longer a link.

The link text, in this case "top executives" needs to stay.  Just don't want it to be a clickable link.

The key here is that all these links will have both the "XYZ" folder and the ".htm" extension, which makes them unique on the page.

I am slightly familiar with regex, but not good enough to do this on my own.

<a href="/XYZ/management/top-executives.htm"><u>top executives</u></a>

Thx

Michael
0
Looking for the easier way to identify  users of  a specific COLD FUSION  website on IIS server
0
Just taking a survey of other developers for best practices in maintaining your search filters and order-by while paging through multiple pages of search results.

Typical scenario.. user enters a few search filters and presses search.   Say, 500 results and showing 25 records per page.  The user changes the display order and clicks through to page 2, page 3, etc.  

What approach are people using to maintain the where-clause (search filters) and the order by so that each page, the same results are shown, but a different page.

Store SQL where clause in session variable?
Save filter criteria to the database?
Save search results to a temporary table and page through them?
Put search fields and order-by fields inside the search form and resubmit them each time?

Pros and cons for all approaches.
Just curious to change/improve my method.
0
Free Tool: SSL Checker
LVL 11
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.

My form has checkboxes with user roles, and a select box with users. I need a select box to repopulate based on the checkbox value(s) when clicked. The checkboxes allow selection of either "all" (in which case the select options need not change) OR any combination of "cm", "adv", "cd" values. Once the checkbox(es) get clicked, the select box should repopulate dynamically (all this before form gets submitted).

<cfquery datasource="datasourceName" name="qry_staff">
    SELECT userID, lastname + ', ' + firstname AS staffName
    FROM   userTable
    WHERE  role IN('cm','adv','cd')
    </cfquery>

<form>
<input type="checkbox" name="assignedRole" id="checkedAll" value="all">All<BR>
<input type="checkbox" name="assignedRole" id="assignedRole" value="cm" class="checkSingle">Case managers<BR>
<input type="checkbox" name="assignedRole" id="assignedRole" value="adv" class="checkSingle">Advisors<BR>
<input type="checkbox" name="assignedRole" id="assignedRole" value="cd" class="checkSingle">Career developers

<select name="staff>
<cfloop query="qry_staff" multiple="multiple">
<cfoutput>
<option value="#qry_staff.userID#">#qry_staff.staffName#</option>
</cfoutput>
</cfloop>
</select>
<input type="submit">
</form>

The entire page must not reload every time a user changes text box selection(s). I haven't yet been able to find a suitable solution. I'm jquery knowledgeable, but not so much Ajax. What I've been able to find makes me think Ajax would really be the way…
0
I have a report that works with a regex and validates well enough w/ the regex. The client is asking to force the date field to be all caps though. I can add the style -  style="text-transform:uppercase" - to force this but when I do it throws an error. Anyone have any idea why this would happen? code below:
<cfinput type="text" 
                                          name="period" 
                                          validate="regex"
                                          pattern="^(JAN|FEB|MAR|APR|JUN|JUL|AUG|SEP|OCT|NOV|DEC)-(19|20)[0-9]{2}$" 
                                          message="Please enter the Accounting Period in the correct format, i.e. MON-YYYY." 
                                          required="true"
                                          id="period"
                                          class="Headline12DrkBlu" 
                                          size="10" 
                                          maxlength="8"
                                          default="#period#">

 But if you add the style to force the all caps it errors out: 

            <cfinput type="text" 
                                          style="text-transform:uppercase"
                                          name="period" 
                                          validate="regex"
                                          pattern="^(JAN|FEB|MAR|APR|JUN|JUL|AUG|SEP|OCT|NOV|DEC)-(19|20)[0-9]{2}$" 
                                          

Open in new window

0
can you run cold fusion in a docker contianer , I dont know if you can even do this , have you done this or have and example that you know works ?

thanks
0
I have two mysql databases on the same mysql server - with identical structures - differing only  in data content.  They each have customer information -  one for year 2016 and the other for year 2017. Objective is to
- list the customers who were active in 2016, but are inactive in 2017...... Lost Customers
- list the customers who are active in 2017 but inactive  in 2016........  New Customers

There are no database  technical problems - permissions etc..   I need help with

     How to manipulate two record sets (2016 and 2017) to create tables of lost and new customers. I am trying a 'lists' approach as you will see from the code attached - idea being to create and  manipulate  lists  from each recordset. I able to create the lists, but not to subtract  them. Printout attached shows lists for 2016 and 2017)

    If the LISTS approach is not the best,  I would ask for advice on alternative

    Many thanks for your help

    James Kane
    =======================================================================================

    PRINTOUT OF  TWO LISTS PLUS  TABLE
    <!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">
    
    <cfparam name="nom" default="0">
    <cfparam name="ListCommon" default="0">
    <head>
    
    
    <!---record sets for year 18 and 17--->
    <cfquery name="activemembers_18" datasource="office_18">
    SELECT civilites, nom, 
    

    Open in new window

    0
    I need to add a try/catch to stop a database connection when nothing is found for a Cold Fusion report query. I'm trying to determine the best place to place the try/catch to ensure this. Researching has led to using COM.Allaire.ColdFusion.Request.Timeout  as the exception to look for but I'm not sure where to place that and exactly how to format it.

    Also the code below has thrown an error at times stating: The value " cannot be converted to a number referencing this line of code:

    <cfset countttl = #invcounts.15Count# + #invcounts.1530C# + #invcounts.30plusC#>

    Thanks for any help. See code below:

    <cfset #date# = #DateFormat("#Now()#","mmmm dd, yyyy")#>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML LANG="EN-US">
    <head>
    <title>Payments</title>
    
    <link href="../css/home.css" rel="stylesheet" type="text/css" />
    
    </head>
    
    <table width="94%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="../images/11.jpg" width="600" height="100" alt="banner"></td>
      </tr>
     </table>
     </td>
    </tr>
    </td>
          
    <div id="support" style="position: absolute; visibility: visible; width: 135px; height: 15px; background-color: #FFFFFF; layer-background-color: #FFFFFF; border: 1px none #000000; z-index: 28; left: 622px; top: 116px;" class="links">
    <a href="../index.htm">Home</a>    | <a href="../******.htm" target="_blank">Support</a> </div>
    
    <script>
     var ld=(document.all);
      var ns4=document.layers;
     var 
    

    Open in new window

    0
    I'm working on a report issue in which the report is failing with the this error: The value " cannot be converted to a number.

    The diff of the fix for the report from an earlier issue is below

    from this:

    where t.NAME<>'PROMPT SB NET 30' -- take out small business terms
    

    Open in new window


    to this:

    where t.NAME='PROMPT SB NET 30' -- take out small business terms
    

    Open in new window


    Is anyone familiar w/ this error? I'm continuing to search but I'm confused as to why this would cause an issue by merely changing  the <> value to =

    thanks
    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.