Copy link to clipboard
Copied
Sometimes this error comes up sometime it don't:
"The system has attempted to use an undefined value, which usually indicates a programming error, either in your code or some system code.
Null Pointers are another name for undefined values."
I have a page from which i can add, edit, and view new prospects. If i either attempt to add, or edit, or view a list of prospects the above error sometimes gets thrown. This forces me to hit F5 or refresh. The error does not cause any of the insert, update to malfunction, it just extremely annoying. Is there any way to eliminate this error forever. Here is the Code to my three pages below... Thank for the help...
<!--- THIS IS THE ADD PROSPECT PAGE--->
<cfquery name="pladsource" datasource="tenantprospect">
SELECT *
FROM pladsource
ORDER BY plascode
</cfquery>
<cfquery name="plstaff" datasource="tenantprospect">
SELECT *
FROM plstaff
ORDER BY plstainitials
</cfquery>
<cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "form1">
<cfquery datasource="tenantProspect">
INSERT INTO tp (tpid, tpcontactdate, tpname, tpphone, tpfulltimeStu, tpdesiredSize, tpUnitsShown, tpApplication, tpreason, tpfinalresult, tpAdSource, tpstaffperson, tpleaseExp, tpwaitlist, tpemail)
VALUES (<cfif IsDefined("FORM.tpid") AND #FORM.tpid# NEQ "">
<cfqueryparam value="#FORM.tpid#" cfsqltype="cf_sql_numeric">
<cfelse>
NULL
</cfif>
, <cfif IsDefined("FORM.tpcontactdate") AND #FORM.tpcontactdate# NEQ "">
<cfqueryparam value="#FORM.tpcontactdate#" cfsqltype="cf_sql_timestamp">
<cfelse>
NULL
</cfif>
, <cfif IsDefined("FORM.tpname") AND #FORM.tpname# NEQ "">
<cfqueryparam value="#FORM.tpname#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpphone") AND #FORM.tpphone# NEQ "">
<cfqueryparam value="#FORM.tpphone#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpfulltimeStu") AND #FORM.tpfulltimeStu# NEQ "">
<cfqueryparam value="#FORM.tpfulltimeStu#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpdesiredSize") AND #FORM.tpdesiredSize# NEQ "">
<cfqueryparam value="#FORM.tpdesiredSize#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpUnitsShown") AND #FORM.tpUnitsShown# NEQ "">
<cfqueryparam value="#FORM.tpUnitsShown#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpApplication") AND #FORM.tpApplication# NEQ "">
<cfqueryparam value="#FORM.tpApplication#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpreason") AND #FORM.tpreason# NEQ "">
<cfqueryparam value="#FORM.tpreason#" cfsqltype="cf_sql_clob" maxlength="16777215">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpfinalresult") AND #FORM.tpfinalresult# NEQ "">
<cfqueryparam value="#FORM.tpfinalresult#" cfsqltype="cf_sql_clob" maxlength="16777215">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpAdSource") AND #FORM.tpAdSource# NEQ "">
<cfqueryparam value="#FORM.tpAdSource#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpstaffperson") AND #FORM.tpstaffperson# NEQ "">
<cfqueryparam value="#FORM.tpstaffperson#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpleaseExp") AND #FORM.tpleaseExp# NEQ "">
<cfqueryparam value="#FORM.tpleaseExp#" cfsqltype="cf_sql_timestamp">
<cfelse>
NULL
</cfif>
, <cfif IsDefined("FORM.tpwaitlist") AND #FORM.tpwaitlist# NEQ "">
<cfqueryparam value="#FORM.tpwaitlist#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, <cfif IsDefined("FORM.tpemail") AND #FORM.tpemail# NEQ "">
<cfqueryparam value="#FORM.tpemail#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
)
</cfquery>
<cflocation url="#CurrentPage#?#CGI.QUERY_STRING#">
</cfif>
<!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>
<script language="javascript" type="text/javascript" src="datetimepicker.js">
//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
//For this script, visit http://www.javascriptkit.com
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<cfform action="#CurrentPage#?#CGI.QUERY_STRING#" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">Date:</div></td>
<td>
<input name="tpcontactdate" id="tpcontactdate" type="text" size="25" class="box"><a href="javascript:NewCal('tpcontactdate','mmddyyyy')"> <img src="image/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
<!---<cfinput type="text" name="tpcontactdate" value="" size="32" />---></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">Name:</div></td>
<td><cfinput type="text" name="tpname" required="yes" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">Phone:</div></td>
<td><cfinput type="text" name="tpphone" required="yes" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td align="right" valign="middle" nowrap="nowrap"><div align="left">Email</div></td>
<td valign="baseline"><label>
<cfinput type="text" name="tpEmail" id="tpEmail" size="32">
</label></td>
</tr>
<tr valign="baseline">
<td align="right" valign="middle" nowrap="nowrap"><div align="left">Current Lease Expire</div></td>
<td valign="baseline">
<input name="tpleaseExp" id="tpleaseExp" type="text" size="25" class="box"><a href="javascript:NewCal('tpleaseExp','mmddyyyy')"> <img src="image/cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
<!---<cfinput type="text" name="tpleaseExp" id="tpleaseExp" size="32"></td>--->
</tr>
<tr valign="baseline">
<td align="right" valign="middle" nowrap="nowrap"><div align="left">Full Time Student?:</div></td>
<td valign="baseline"><table>
<tr>
<td><cfinput type="radio" name="tpfulltimeStu" value="No" /> NO - <cfinput type="radio" name="tpfulltimeStu" value="Yes" /> YES </td>
<td></td>
</tr>
<tr>
<td> </td>
<td></td>
</tr>
</table></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left"></div></td>
<td><label></label></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">Unit Size:</div></td>
<td><select name="tpdesiredSize">
<option value="" ></option>
<option value="1BR-1BA" >1BR-1BA</option>
<option value="2BR-1BA" >2BR-1BA</option>
<option value="2BR-1.5BA" >2BR-1.5BA</option>
<option value="2BR-2BA" >2BR-2BA</option>
<option value="3BR" >3BR</option>
<option value="COMM" >COMM</option>
</select> </td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">Waiting List?:</div></td>
<td><table>
<tr>
<td><cfinput type="radio" name="tpwaitlist" id="tpwaitlist" value="No" /> NO - <cfinput type="radio" name="tpwaitlist" id="tpwaitlist" value="Yes" /> YES </td>
<td></td>
</tr>
<tr>
<td> </td>
<td></td>
</tr>
</table></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">Unit(s) Shown:</div></td>
<td><cfinput type="text" name="tpUnitsShown" value="" size="32" /></td>
</tr>
<tr valign="baseline">
<td align="right" valign="middle" nowrap="nowrap"><div align="left">Application Given?:</div></td>
<td><table id="tpfulltimeStu" name="tpfulltimeStu">
<tr>
<td><cfinput type="radio" name="tpApplication" id="tpApplication" value="No" /> NO - <cfinput type="radio" name="tpApplication" id="tpApplication" value="Yes" /> YES </td>
<td></td>
</tr>
<tr>
<td> </td>
<td></td>
</tr>
</table></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">If No Give Reason:</div></td>
<td><cftextarea name="tpreason" wrap="physical" height="10"></cftextarea></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">
Final Disposition:</div></td>
<td><cftextarea name="tpfinalresult" wrap="physical" height="10"></cftextarea></td>
</tr>
<tr valign="baseline"> </tr>
<tr valign="baseline"> </tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">AD Source:</div></td>
<td>
<select name="tpadsource" required="yes">
<option></option>
<!--- dynamically populate the second drop down list based on the get_Sub_Group query --->
<cfloop query="pladsource">
<option value="<cfoutput>#pladsource.plascode#</cfoutput>"><cfoutput>#pladsource.plasname#</cfoutput></option>
</cfloop>
</select></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left">Staff Who Assisted:</div></td>
<td>
<select name="tpstaffperson" required="yes">
<option></option>
<!--- dynamically populate the second drop down list based on the get_Sub_Group query --->
<cfloop query="plstaff">
<option value="<cfoutput>#plstaff.plstainitials#</cfoutput>"><cfoutput>#plstaff.plastaname#</cfoutput></option>
</cfloop>
</select></td>
</tr>
<tr valign="baseline">
<td align="right" valign="top" nowrap="nowrap"><div align="left"></div></td>
<td><cfinput type="submit" name="submit" value="Insert record" /></td>
</tr>
</table>
<cfinput type="hidden" name="tpid" value="" />
<cfinput type="hidden" name="MM_InsertRecord" value="form1" />
</cfform>
<p> </p>
</body>
</html>
<!--- THIS IS THE EDIT PROSPECT PAGE--->
<cfparam name="URL.tpid" default="1">
<cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
<cfif IsDefined("FORM.MM_UpdateRecord") AND FORM.MM_UpdateRecord EQ "form1">
<cfquery datasource="tenantProspect">
UPDATE tp
SET tpcontactdate=<cfif IsDefined("FORM.tpcontactdate") AND #FORM.tpcontactdate# NEQ "">
<cfqueryparam value="#FORM.tpcontactdate#" cfsqltype="cf_sql_timestamp">
<cfelse>
''
</cfif>
, tptimeshown=<cfif IsDefined("FORM.tptimeshown") AND #FORM.tptimeshown# NEQ "">
<cfqueryparam value="#FORM.tptimeshown#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpname=<cfif IsDefined("FORM.tpname") AND #FORM.tpname# NEQ "">
<cfqueryparam value="#FORM.tpname#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpphone=<cfif IsDefined("FORM.tpphone") AND #FORM.tpphone# NEQ "">
<cfqueryparam value="#FORM.tpphone#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpfulltimeStu=<cfif IsDefined("FORM.tpfulltimeStu") AND #FORM.tpfulltimeStu# NEQ "">
<cfqueryparam value="#FORM.tpfulltimeStu#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpdesiredSize=<cfif IsDefined("FORM.tpdesiredSize") AND #FORM.tpdesiredSize# NEQ "">
<cfqueryparam value="#FORM.tpdesiredSize#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpUnitsShown=<cfif IsDefined("FORM.tpUnitsShown") AND #FORM.tpUnitsShown# NEQ "">
<cfqueryparam value="#FORM.tpUnitsShown#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpApplication=<cfif IsDefined("FORM.tpApplication") AND #FORM.tpApplication# NEQ "">
<cfqueryparam value="#FORM.tpApplication#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpreason=<cfif IsDefined("FORM.tpreason") AND #FORM.tpreason# NEQ "">
<cfqueryparam value="#FORM.tpreason#" cfsqltype="cf_sql_clob" maxlength="16777215">
<cfelse>
''
</cfif>
, tpfinalresult=<cfif IsDefined("FORM.tpfinalresult") AND #FORM.tpfinalresult# NEQ "">
<cfqueryparam value="#FORM.tpfinalresult#" cfsqltype="cf_sql_clob" maxlength="16777215">
<cfelse>
''
</cfif>
, tpAdSource=<cfif IsDefined("FORM.tpAdSource") AND #FORM.tpAdSource# NEQ "">
<cfqueryparam value="#FORM.tpAdSource#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpstaffperson=<cfif IsDefined("FORM.tpstaffperson") AND #FORM.tpstaffperson# NEQ "">
<cfqueryparam value="#FORM.tpstaffperson#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpleaseExp=<cfif IsDefined("FORM.tpleaseExp") AND #FORM.tpleaseExp# NEQ "">
<cfqueryparam value="#FORM.tpleaseExp#" cfsqltype="cf_sql_timestamp">
<cfelse>
''
</cfif>
, tpwaitlist=<cfif IsDefined("FORM.tpwaitlist") AND #FORM.tpwaitlist# NEQ "">
<cfqueryparam value="#FORM.tpwaitlist#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
, tpemail=<cfif IsDefined("FORM.tpemail") AND #FORM.tpemail# NEQ "">
<cfqueryparam value="#FORM.tpemail#" cfsqltype="cf_sql_clob" maxlength="100">
<cfelse>
''
</cfif>
WHERE tpid=<cfqueryparam value="#FORM.tpid#" cfsqltype="cf_sql_numeric">
</cfquery>
<cflocation url="search.cfm">
</cfif>
<cfquery name="edittp" datasource="tenantProspect">
SELECT *
FROM tp
WHERE tpid = <cfqueryparam value="#URL.tpid#" cfsqltype="cf_sql_numeric">
</cfquery>
<cfquery name="pladsource" datasource="tenantProspect">
SELECT *
FROM pladsource
</cfquery>
<cfquery name="plstaff" datasource="tenantProspect">
SELECT *
FROM plstaff
</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>
<script language="javascript" type="text/javascript" src="datetimepicker.js">
//Date Time Picker script- by TengYong Ng of http://www.rainforestnet.com
//Script featured on JavaScript Kit (http://www.javascriptkit.com)
//For this script, visit http://www.javascriptkit.com
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<cfform action="#CurrentPage#?#CGI.QUERY_STRING#" method="post" name="form1" id="form1">
<table align="center">
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Date</div></td>
<td><input type="text" name="tpcontactdate" value="<cfoutput>#LSDateFormat(edittp.tpcontactdate,'MM-DD-YYYY')#</cfoutput>" size="32" /></td>
</tr>
<tr valign="baseline">
<!---<td nowrap="nowrap" align="right">Tptimeshown:</td>
<td><input type="text" name="tptimeshown" value="<cfoutput>#edittp.tptimeshown#</cfoutput>" size="32" />---></td>
<div align="left"></div>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Name:</div></td>
<td><input type="text" name="tpname" value="<cfoutput>#edittp.tpname#</cfoutput>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Phone:</div></td>
<td><input type="text" name="tpphone" value="<cfoutput>#edittp.tpphone#</cfoutput>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Email</div></td>
<td><input type="text" name="tpemail" value="<cfoutput>#edittp.tpemail#</cfoutput>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Lease Expires</div></td>
<td><input type="text" name="tpleaseExp" value="<cfoutput>#LSDateFormat(edittp.tpleaseExp,'MM-DD-YYYY')#</cfoutput>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left"></div></td>
<td> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Full Time Student:</div></td>
<td><input type="radio" name="tpfulltimeStu" value="Yes "<cfoutput>#Iif(toString(edittp.tpfulltimeStu)EQ "Yes",DE("CHECKED"),DE(""))#</cfoutput> />Yes -
<input type="radio" name="tpfulltimeStu" value="No "<cfoutput>#Iif(toString(edittp.tpfulltimeStu)EQ "No ",DE("CHECKED"),DE(""))#</cfoutput> />No <br/></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Unit Size:</div></td>
<td>
<select name="tpdesiredsize">
<option value="<cfoutput>#edittp.tpdesiredSize#</cfoutput>"<cfif (isDefined("edittp.tpdesiredSize"))>selected</cfif>><cfoutput>#edittp.tpdesiredsize#</cfoutput></option>
<option value="1BR-1BA" >1BR-1BA</option>
<option value="2BR-1BA" >2BR-1BA</option>
<option value="2BR-1.5BA" >2BR-1.5BA</option>
<option value="2BR-2BA" >2BR-2BA</option>
<option value="3BR" >3BR</option>
<option value="COMM" >COMM</option>
</select>
<!----<input type="text" name="tpdesiredSize" value="<cfoutput>#editt.tpdesiredSize#</cfoutput>" size="32" />--->
</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Waiting List:</div></td>
<td><input type="radio" name="tpwaitlist" value="Yes "<cfoutput>#Iif(toString(edittp.tpwaitlist)EQ "Yes",DE("CHECKED"),DE(""))#</cfoutput> />Yes -
<input type="radio" name="tpwaitlist" value="No "<cfoutput>#Iif(toString(edittp.tpwaitlist)EQ "No ",DE("CHECKED"),DE(""))#</cfoutput> />No <br/></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left"></div></td>
<td> </td>
</tr><br>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Unit(s) Shown</div></td>
<td><input type="text" name="tpUnitsShown" value="<cfoutput>#edittp.tpUnitsShown#</cfoutput>" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left"></div></td>
<td> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Application Given?:</div></td>
<td><input type="radio" name="tpApplication" value="Yes "<cfoutput>#Iif(toString(edittp.tpApplication)EQ "Yes",DE("CHECKED"),DE(""))#</cfoutput> />Yes -
<input type="radio" name="tpApplication" value="No "<cfoutput>#Iif(toString(edittp.tpApplication)EQ "No ",DE("CHECKED"),DE(""))#</cfoutput> />No <br/>
</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">If no give reason:</div></td>
<td><cftextarea type="text" name="tpreason" value="#tostring(edittp.tpreason)#" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Final Disposition:</div></td>
<td><cftextarea name="tpfinalresult" wrap="virtual" value="#tostring(edittp.tpfinalresult)#" type="text" size="32" /></td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Ad Source:</div></td>
<td>
<select name="tpAdSource">
<cfoutput query="pladsource">
<option value="#pladsource.plascode#" <cfif (isDefined("edittp.tpAdSource") AND pladsource.plascode EQ edittp.tpAdSource)>selected</cfif>>#pladsource.plasname#</option>
</cfoutput>
</select>
</td>
</tr>
<tr> </tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left">Staff Who Assisted:</div></td>
<td>
<select name="tpstaffperson">
<cfoutput query="plstaff">
<option value="#plstaff.plstainitials#" <cfif (isDefined("edittp.tpstaffperson") AND plstaff.plstainitials EQ edittp.tpstaffperson)>selected</cfif>>#plstaff.plastaname#</option>
</cfoutput>
</select>
</td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left"></div></td>
<td> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left"></div></td>
<td> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"><div align="left"></div></td>
<td> </td>
</tr>
<tr valign="baseline">
<td nowrap="nowrap" align="right"> </td>
<td><input type="submit" value="Update record" /></td>
</tr>
</table>
<input type="hidden" name="tpid" value="" />
<input type="hidden" name="tpid" value="<cfoutput>#edittp.tpid#</cfoutput>" />
<input type="hidden" name="MM_UpdateRecord" value="form1" />
</cfform>
<p> </p>
<cfform name="form1" id="form1" method="post" action="">
</cfform>
</body>
</html>
<!--- THIS IS THE LIST TO VIEW PROSPECT PAGE--->
<cfquery name="List_All_Tenant_Prospects" datasource="tenantProspect">
SELECT *
FROM tp
order by tpapplication desc, tpcontactdate desc
</cfquery>
<cfquery name="Adsource" datasource="tenantProspect">
SELECT pladsource.plascode, pladsource.plasname
FROM pladsource
ORDER BY pladsource.plasname
</cfquery>
<cfif #form.date1# eq"" AND #form.date2# eq"">
<cfquery name="List_All_Tenant_Prospects" datasource="tenantProspect">
SELECT *
FROM tp
order by tpcontactdate desc
</cfquery><cfelse>
<cfquery name="List_All_Tenant_Prospects" datasource="tenantProspect">
select *
from tp
where tp.tpcontactdate between (#CreateODBCDate(form.date1)#) AND (#CreateODBCDate(form.date2)#)
order by tpApplication desc, tpcontactdate desc
</cfquery></cfif>
<!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=utf-8" />
<title>Tenant Pipeline/Prospect List</title>
<link href="CSS/tplistContainer.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style></head>
<div id="tpSheetTitle">Tenant Pipeline/Prospect List From: <br><cfoutput>#form.date1# thru #form.date2#</cfoutput></div>
<body><br>
<div id="tpList">
<span class="top_row">Row:</span>
<span class="top_name">Name:</span>
<span class="top_date">Date:</span>
<span class="top_lookingFor">Unit Type:</span>
<span class="top_appTaken">App:</span>
<span class="top_adSource">Source:</span>
<span class="top_staff">Staff:</span><br><br>
<cfoutput query="List_All_Tenant_Prospects">
<div id="tp_listOutput"><span class="row">#CURRENTROW#).</span>
<span class="name"><a href="editTp.cfm?tpid=#tpid#">#List_All_Tenant_Prospects.tpname#</a></span>
<span class="date">#LSDateFormat(List_All_Tenant_Prospects.tpcontactdate,'MM-DD-YYYY')#</span>
<span class="lookingFor">#List_All_Tenant_Prospects.tpdesiredSize#</span>
<span class="appTaken">#List_All_Tenant_Prospects.tpApplication#</span>
<span class="adSource">#List_All_Tenant_Prospects.tpAdSource#</span>
<span class="staff">#List_All_Tenant_Prospects.tpstaffperson#</span><br>
<span class="summary2">#List_All_Tenant_Prospects.tpphone#</span><br>
<span class="summary"><CFIF #List_All_Tenant_Prospects.tpUnitsShown# NEQ "">Unit(s) Shown: #List_All_Tenant_Prospects.tpUnitsShown#. <CFELSE></CFIF>
<cfif #List_All_Tenant_Prospects.tpApplication# EQ "no"> Reason for no application:#TOSTRING(List_All_Tenant_Prospects.tpreason)#. <cfelse></cfif>
<cfif #tostring(List_All_Tenant_Prospects.tpfinalresult)# NEQ ""> Final Disposition: #tostring(List_All_Tenant_Prospects.tpfinalresult)#.<CFELSE></cfif></span>
<!---END OF TPLISTOUTPUT----></div><br />
</cfoutput><!---END OF TPLIST---></div>
<cfoutput>
<div id="legend">
<span class="legend_text_center">#List_All_Tenant_Prospects.RecordCount# Total Inquiries. </span></cfoutput><span class="legend_text_center"><br />
<cfoutput query="adsource">
#Adsource.plascode#: #Adsource.plasname#, </cfoutput>
<br><br><a href="addtp2.cfm">Add New Prospect</a></span>
<!---END OF LEGEND DIV---></div>
</body>
</html>
Copy link to clipboard
Copied
The most frequent reason that error occurs in my code is that I try to refer to some data from a query that returned 0 records.