Creating Passable Variables
When I run the page, I am getting a undefined variable in form error when trying to load the action page with the SQL statments. I call myself using different combinations, but I have yet to make this created variable usable.
here is a portion of my code:
===============================
<cfparam name="variable" default="0">
<center>
<table border="8" cellpadding="1" cellspacing="10">
<tr> <!-- form for submitting new entries within various tables -->
<td align="center">
<form action="_ITManagementPg5more.cfm" method="post" name="formNewRecords" id="formNewRecords">
.
.
.
<tr>
<td><cfinvoke component="_COMSARE IT" method="GetComputerSoftware" returnvariable="qryComputerSoftware">
Installed Software::<select name="selectComputerSoftware" id="selectConputerSoftware"><option value="--">-------</option>
<cfoutput query="qryComputerSoftware"><option value="#ComputerID#">#SoftwareID# =+= #ComputerName# -- #Title#</option>
<cfif isdefined ("variable")>
<cfset variable = #SoftwareID#></cfif></cfoutput></select>
</td>
</tr>
</table>
==============================
...this page loads without any problems. I am thinking I declared my variable so it exist within the form using cfparam. By assigning the variable using cfset within the query, I am grabbing the data from the query, no sweat?
Now, my action page displays the error, variable not found in form. here is the code:
==============================
.
.
.
<cfif #Form.selectComputerSoftware# IS "--">
SOFTWARE ON COMPUTER NOT REMOVED !! <br> <cfoutput>#Form.variable#</cfoutput>
<cfelse>
<cfoutput> #Form.variable# </cfoutput>
.
.
.
</cfquery>
</cfif>
<!-- End of SQL -->
===================================
... I know this is an empty SQL statement, but I am just trying to make sure my variable is being read for I am debugging. If I placed another cfparam at the begin to make sure it is still declared, I get a different error.
I really would like to grab two variables for my SQL statement in my action page, but if I can't create one to pass over, I will only get the one variable linked by my select option value.
Did I explain this correctly? Can I be helped?

