Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with passing parameters

Status
Not open for further replies.

Mary01

Programmer
Jun 23, 2005
12
0
0
US
I'm new to coldfusion and fuseboxes and appreciate any help.
I have a stored procedure that accepts two In-parameters and I'm supposed to pass them through a form. The submit is supposed to fire the query called qry_ReassignRequest. Here's what I have in dsp_reassign page, the switch file is at the end too. How do I pass the two parameters to the qry?


<cfparam name="spAssignRequest_Return.RequestDescription" default="0">
<cfparam name="spAssignRequest_Return.ContactName" default="0">
<cfparam name="spAssignRequest_Return.EntityHubID" default="0">

<cfoutput>
<cfset now = "#datepart("m",now())#/#datepart("d",now())#/#datepart("yyyy",now())#">
<cfform action="#SelfPath##XFA.Submit#" method="post">
<input type="hidden" name="HelpdeskRequestID" value="#spAssignRequest_Return.HelpdeskRequestID#">
<input type="hidden" name="EntityHubID" value="#spAssignRequest_Return.EntityHubID#">
<table CELLSPACING="1" CELLPADDING="2" class="color-border">
<tr id="color-title">
<td colspan=2>#spSelectSystemMessage_return.ShortMessageDesc#</td>
</tr>

<tr>
<td align="right" width="175px" class="color-header"><p>Contact Name:&nbsp;&nbsp;*</p></td>
<td class="color-text">#spAssignRequest_Return.ContactName#</td>
</tr>

<tr>
<td align="right" width="175px" class="color-header"><p>Request Description:&nbsp;&nbsp;*</p></td>
<td class="color-text">
<textarea name="RequestDescription" class="textarea">#spAssignRequest_Return.RequestDescription#</textarea>
</td>
</tr>

<tr>
<td align="right" width="175px" class="color-header"><p>Helpdesk Staff:&nbsp;&nbsp;</p></td>
<td class="color-text"><select name="EntityHubID" class="info">
<cfloop query="spHelpdeskStaff_return">
<option value="#EntityHubID#">#StaffName#</option>
</cfloop>
</td>
</tr>
</table>
<br>
<input type="button" value="< Back" class="info" onclick="window.location.href='#selfpath##XFA.Back#';">
<input type="submit" value="Submit" class="info" onclick="window.location.href='#SelfPath##XFA.ReAssign#&HelpDeskRequestID=#spRequestInfo_Return.HelpDeskRequestID#&EntityHubId=#spRequestInfo_Return.EntityHubId#';">
</cfform>
</cfoutput>

the switch file:

<cfcase value="ReassignRequest">
<cfinclude template="Queries/qry_spSelectSystemMessage.cfm">
<cfinclude template="Queries/qry_spHelpdeskStaff.cfm">
<!---<cfinclude template="Queries/qry_spReassignRequest.cfm">--->
<cfinclude template="Queries/qry_spAssignRequest.cfm">
<cfset XFA.Back ="HelpdeskAdministration.ListStaffTicket">
<cfset XFA.Submit="HelpdeskAdministration.RequestReassignment">
<cfinclude template="BLOCKS/dsp_ReAssignRequest.cfm">
</cfcase>

<cfcase value="RequestReAssignment">
<cfinclude template="Queries/qry_spReAssignRequest.cfm">
<cfset XFA.Redirect ="HelpdeskAdministration.ListStaffTicket">
<cfinclude template="Actions/act_redirect.cfm">
</cfcase>

Reassignrequest.cfm file:
<cfstoredproc datasource="#request.dsn#" procedure="spReassignRequest">
<cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbvarname="@HelpdeskRequestID" value="#attributes.HelpdeskRequestID#" null="no">
<cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbvarname="@entityHubID" value="#attributes.EntityHubID#" null="no">
<cfprocresult name="spReAssignRequest_Return">
</cfstoredproc>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top