I'm stumped on a problem and I'm hoping someone can help. I apologize for
the length of this message but I figured I should give all the info I can.
I have two tables: tblChangeRequest and tblStatus with a one to many
relationship. I'm trying to list all tasks in the change request table with
a pull down list for status for each record so you can update whichever
statuses you want using the pull down list for each record. I'm having two
problems: 1) I can get the statuses to list but I can't get it to
automatically default to the status that is currently in the
tblChangeRequest records and 2) I can't figure out how I am supposed to do
the mass update of all records. I'm hoping to have it similar to the way
egroups.com does mass updates of mailing lists. I'm a CF newbie and can't
find any examples of how to do it.
Should I be using a CFUPDATE tag or do I need to do a more complex SQL
statement? Do I need any counter of any kind in that statement? Any help
would be greatly appreciated.
Here's my code thus far:
<cfquery name="qryRequests" datasource="Change_Request" dbtype="ODBC">
SELECT RequestID, txtAssignedTo, txtStaff, dtEntered, dtDeadline,
txtPriority, txtStatus, dtCompleted
FROM dbo.tblChangeRequest
</cfquery>
<cfquery name="qryStatus" datasource="Change_Request" dbtype="ODBC">
SELECT txtStatus
FROM dbo.tblStatus
ORDER BY txtStatus
</cfquery>
<table class="text" cellspacing=5>
<tr>
<td valign="bottom"></td>
<td valign="bottom"><b>Request ID</b></td>
<td valign="bottom"><b>Assigned To</b></td>
<td valign="bottom"><b>Staff Member</b></td>
<td valign="bottom"><b>Date Entered</b></td>
<td valign="bottom"><b>Deadline</td>
<td valign="bottom"><b>Priority</b></td>
<td valign="bottom"><b>Current<br>Status</b></td>
<td valign="bottom"><b>Date<br>Completed</b></td></tr>
<cfform action="change_status_finish.cfm" method="post">
<cfoutput query="qryRequests" startrow=1>
<tr>
<td valign="top"></td>
<td valign="top" bgcolor="LightGoldenrodYellow">#RequestID#</td>
<td valign="top" bgcolor="LightGoldenrodYellow">#txtAssignedTo#</td>
<td valign="top" bgcolor="LightGoldenrodYellow">#txtStaff#</td>
<td valign="top" bgcolor="LightGoldenrodYellow">#DateFormat(dtEntered,
"MM/DD/YY")#</b></A><br></td>
<td valign="top" bgcolor="LightGoldenrodYellow">#DateFormat(dtDeadline,
"MM/DD/YY")#</b></A><br></td>
<td valign="top" bgcolor="LightGoldenrodYellow">#txtPriority#</td>
<td valign="top" bgcolor="LightGoldenrodYellow"><select name="txtStatus">
<cfloop query="qryStatus">
<option value="#qryStatus.txtStatus#" #IIF((qryStatus.txtStatus EQ
qryRequests.txtStatus), DE('selected'), DE(''))#>#txtStatus#</option>
</cfloop>
</select></td>
<td valign="top" bgcolor="LightGoldenrodYellow">#DateFormat(dtCompleted,
"MM/DD/YY")#</b></A><br></td>
</tr>
</CFOUTPUT></table>
<input type="submit" value="submit"></cfform>
Thanks again for any help anyone can provide!
-Marla Jenkins
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.