Copy link to clipboard
Copied
I am somewhat new to Coldfusion 9 in a IIS platform through Dreamweaver CS4 and could use some direction. I am working on a form where someone has submited a request for approval. The user has requested a bulk approval button for all users that fall under certain filter conditions to do a mass approve ( setting the value to 1). I have not been able to either pass the values to the current approval method or approve them on the existing page. Below is the coding for the page as I have it.
After the filter has applied I need to get the values of the #qRecords.VR_Machine_Participant_Activity_Login_ID# and have them all approve as apposed to doing them individually which they are doing now. I have looked at several methods, but they are not meeting my needs. Some information cut for space but left the form action.
<form name="form1" method="post">
<table width="996" border="1">
<tr class="ReportColumnHeadingSmall">
<td width="150">Approval Needed</td>
<td width="100">Approved</td>
<td width="180">Business Unit</td>
</tr>
<tr class="data0Small">
<td>
<select name="cboApprovalRequired" class="smallFont">
<!---<option value="All">All</option>--->
<option value="1"
<cfif isDefined("vApprovalRequired")>
<cfif vApprovalRequired eq 1>
selected
</cfif>
</cfif>
>True</option>
<option value="0"
<cfif isDefined("vApprovalRequired")>
<cfif vApprovalRequired eq 0>
selected
</cfif>
</cfif>
>False</option>
</select>
</td>
<td>
<select name="cboApproved" class="smallFont">
<!---<option value="All">All</option>--->
<option value="1"
<cfif isDefined("vApproved")>
<cfif vApproved eq 1>
selected
</cfif>
</cfif>
>True</option>
<option value="0"
<cfif isDefined("vApproved")>
<cfif vApproved eq 0>
selected
</cfif>
</cfif>
>False</option>
</select>
</td>
<!--- Drop down showing the current available units to choose from --->
<td>
<select name="cbo_BusUnit" id="cbo_BusUnit">
<cfoutput query="qBusUnit">
<option value="#qBusUnit.BusinessUnit#"
<cfif (isDefined("vBusUnit") AND vBusUnit is qBusUnit.BusinessUnit)>selected </cfif>>#qBusUnit.BusinessUnit#</option>
</cfoutput>
</select>
</td>
<!--- This is where I'd like to mark the items for approval. --->
<td><input type="submit" name="Submit" value="Apply Filter">
</td>
<td width="450" align="right">
This will approve all records displayed on the current page.
<input name="bVr_id" type="button" value="Approve">
<cfoutput query="qRecords"><a href= "vr_participantactivityapproval.cfm?participant=#qRecords.VR_Machine_Participant_Activity_Login_ID#">
<img src="../Images/switch_user.gif" alt="Approve" width="16" height="16" border="0"></a>
</cfoutput>
</td>
</tr>
<tr class="ReportColumnHeadingSmall">
<td colspan="3" height="20"></td>
</tr>
</table>
<table width="996" border="1">
<tr class="ReportColumnHeadingSmall">
<td></td>
<td>Machine or<br>Activity Type</td>
<td>Activity</td>
<td>Comments</td>
<td>Oper.<br>ID</td>
<td>Name</td>
<td>Approved</td>
<td>Login Status</td>
<td>Login Date Time</td>
<td>Minutes</td>
</tr>
<cfoutput query="qRecords">
<tr class="data#Int(qRecords.CurrentRow MOD 2)#Small">
<td>
<!--- Current method of approving them individually. --->
<a href="vr_participantactivityapproval.cfm?participant=#qRecords.VR_Machine_Participant_Activity_Login_ID#"><img src="../Images/switch_user.gif" alt="Approve" width="16" height="16" border="0"></a>
</td>
<td class="SmallFont">#qRecords.ActivityType#</td>
<td class="SmallFont">#qRecords.Activity#</td>
<td class="SmallFont">#qRecords.Value_Nvarchar#</td>
<td class="SmallFont">#qRecords.VR_Department_Number#</td>
<td class="SmallFont">#qRecords.FullName#</td>
<td class="SmallFont"><cfif #qRecords.Approved# IS 0>False<cfelse>True</cfif></td>
<td class="SmallFont">#qRecords.Login_Status#</td>
<td class="SmallFont">#DateFormat(qRecords.Login_Date, 'ddd mm/dd/yyyy')# #TimeFormat(qRecords.Login_Date, 'H:mm')#</td>
<td class="SmallFont">#qRecords.TotalTime#</td>
</tr>
</cfoutput>
</table>
</form>
Copy link to clipboard
Copied
I suggest displaying all the potential approvees as checked checkboxes. The user can then uncheck as many as he wants.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now