Yes, that would be the idea, but of course, backup first so you can go back if things don't go quite as planned.
displaying previously entered multiple fields
Collapse
X
-
Hey Acoder,
Alright here is what i have on the main page in full. It is counting correctly for both serials that already had serials and ones that did not have serials. An there both counting correct when i add serials to both. But i can still not get parts to come up if a serial was not added. When i add parts it adds parts correctly it is just not showing the parts table if a part was not filled out.
Code:<div id="dynamicInput"> <!--- All Ticket Information Appears Here---> <cfset count = 0> <cfoutput query="serial"> <cfset count = count + 1> <cfset model_no = #model_no#> <cfset product_type = #product_type#> <cfset type_hardware_failure = #type_hardware_failure#> <cfset software_hardware = #software_hardware#> <cfset resolution_verified_by = #resolution_verified_by#> <cfset dept_responsibility = #dept_responsibility#> <cfinclude template="serialpartsdisplay.cfm"> </cfoutput> <cfif serial.recordcount is 0> <cfset count = 1> <cfset model_no = ""> <cfset product_type = ""> <cfset type_hardware_failure = ""> <cfset pka_serialNo = ""> <cfset software_hardware = ""> <cfset description = ""> <cfset resolution = ""> <cfset resolution_date = ""> <cfset resolution_verified_by = ""> <cfset verification_date = ""> <cfset dept_responsibility = ""> <cfinclude template="serialpartsdisplay.cfm"> </cfif> <!--- <cfoutput query="parts"> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset rma_number = #rma_number#> <cfinclude template="serialpartsdisplay.cfm"> </cfoutput>---> <cfif getparts.recordcount is 0> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset rma_number = ""> <!---<cfinclude template="serialpartsdisplay.cfm">---> </cfif> <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" /> </div> <input type="button" class="addticket" value="Add Serial" onClick="addInput('dynamicInput');" >
an here is what i have on the template page
Code:<!---IF HAVE ANY BLANKS IN ANY FIELDS THIS MAKES IT SO THE FIELD WILL SHOW UP---> <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure ---> <cfoutput> <div id="dynamic#count#Input"> <table class="zpExpandedTable" id="modeltable"> <th class="sectiontitletick" colspan="7"> Serial Information #count# </th> <tr> <td id="paddingformultitop">Model No: </td> </td> <td> <select name="modelno_#count#"> <option value="">Make A Selection</option> <cfloop query="models"> <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option> </cfloop> </select></td> <td> Product Type: </td> <td> <select name="producttype_#count#"> <option value="" selected>No Choice</option> <cfloop query="getProdType"> <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> </cfloop> </select> </td> <td class="red"> Type Of Hardware Failure*: </td> <td> <select name="hardwarefailure_#count#"> <option value="" selected>Make A Selection</option> <cfloop query="getHardwareFail"> <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option> </cfloop> </select> </td> </tr> <table> <!--- Shows what was previously entered for Serial Number and Software/Hardware ---> <table class="zpExpandedTable" id="modeltable"> <tr> <td id="paddingformultitop"> Serial Number: <input type="text" name="serialnum_#count#" value="#pka_serialNo#"> Software/Hardware: <select name="softhardware_#count#"> <option value="" selected>No Choice</option> <cfloop query="getSoftHard"> <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option> </cfloop> </select> </td> </tr> </table> <!--- Shows what was previously entered for Description ---> <cfquery name="getnotes" dbtype="query" > SELECT * FROM notes WHERE fk_serialNo=<cfqueryparam value="#pka_serialNo#" cfsqltype="cf_sql_char" maxLength="20"> </cfquery> <cfloop query="getnotes"> <input type="hidden" name="pk_num_#count#" id="pk_num" value="" /></cfloop> <!---<div style="width: 150px; height: 150px; overflow-y: scroll; scrollbar-arrow-color:blue; scrollbar-face-color: #e7e7e7; scrollbar-3dlight-color: #a0a0a0; scrollbar-darkshadow-color:#888888;">---> <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0"> <tr><td id="paddingformutli"> Previously Submitted Descriptions:</td><td id="paddingformutli"> <div id="descriptionbox" style="HEIGHT:100px; WIDTH:500px; OVERFLOW:auto;" > <cfloop query="getnotes"> Added By: #fk_addedBy# <br/> Dated Added: #DateFormat(date_stamp,'mm/dd/yyyy')#<br/><br/> #description# <div id="line"></div> </cfloop></div></td> </tr> </table> <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0"> <tr> <!---<input type="hidden" name="thedescriptoin_#count#" id="thedescriptoin" value="#description#" />---> <td id="paddingformutli"> Description: </td> <td class="descriptionmoveinmulti"> ( You may enter up to 1000 characters. ) <br> <textarea maxlength='1000' onkeyup='return descriptionmaxlength(this)' onkeydown='return descriptionmaxlength(this)'rows='4' cols='60' name="thedescription_#count#"></textarea> </td> </tr> </table> <!---Shows what was previously entered for Resolution ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td id="paddingformutli"> Resolution: </td> <td class="resolutionmoveinmulti"> ( You may enter up to 1500 characters. ) <br> <textarea maxlength="1500" onkeyup="return resolutionismaxlength(this)" onkeydown="return resolutionismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea> </td> </tr> </table> <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by ---> <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0"> <tr> <td id="paddingformultitop"> Resolution Date: (MM/DD/YYYY) </td> <td> <input type="text" name="resdate_#count#" value="#DateFormat(resolution_date,'mm/dd/yyyy')#"> Current Date: <input type="checkbox" name="currentdateresol_#count#" onClick="resdate_#count#.value=fill_date()"> </td> <td> Resolution Verified as effective by: </td> <td> <select name="resvertified_#count#"> <option value="" selected>Make A Selection</option> <cfloop query="gettech"> <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#> selected</cfif>>#fname# #lname#</option> </cfloop> </select> </td> </tr> </table> <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date) ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td id="paddingformultitop"> Verification Date: (MM/DD/YYYY) </td> <td class="vertificationmoveinmulti"> <input type="text" name="vertifidate_#count#" value="#DateFormat(verification_date,'mm/dd/yyyy')#"> Current Date: <input type="checkbox" name="currentdatevert_#count#" onClick="vertifidate_#count#.value=fill_date()"> </td> </tr> </table> <!--- Shows what was previously entered for Dept/Vendor Responsibility ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td class="red" id="paddingformultitop"> Dept/Vendor Responsibility*: <select name="deptvendor_#count#"> <option value="" selected>Make A Selection</option> <cfloop query="getDeptVendor"> <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option> </cfloop> </select> </td> </tr> </table> <input type="hidden" name="serialcount" id="serialcount" value="#count#"> <!--- Adds Delete to every ticket ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td> <input type="button" class="removeticket" value="Remove Serial #count#" onClick="removeElement('dynamic#count#Input')"> </td> </tr> <tr> <td> <input type="button" class="addticket" value="Add Parts" onClick="addpartInput('dynamic#count#Input')"> </td> </tr> </table> <!---Shows what was previously entered into parts table---> <!---dbtype="query"---> <cfquery name="getparts" dbtype="query" > SELECT * FROM parts WHERE fk_serialNo=<cfqueryparam value="#pka_serialNo#" cfsqltype="cf_sql_char" maxLength="20"> </cfquery> <cfset count1 = 0> <!---<cfif serial.recordcount is 0>---> <cfloop query="getparts"> <cfset count1 = count1 + 1> <div id="part#count1#Name#count#"> <!---<cfset partliststr = ""> <cfloop from="1" to="#count1#" index="pl"> <cfset partliststr = partliststr & #pl# & ","> </cfloop> <input type="hidden" name="part2count#count#" id="part2count#count#" value="#partliststr#"> <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#">---> <!---THIS IS THE PARTS SECTION---> <input type="hidden" name="pkpartID_#count1#_#count#" id="pkpartID" value="#pk_partID#" /> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <th class="sectiontitle" colspan="7">Parts Information #count1# Serial Information #count#</th> <tr> <td class='indent' id='formfieldpadding'>HC P/N: <input type='text' name="hcpn_#count1#_#count#" style="margin:0px" value="#hc_partNo#"></td> <td> Parts been returned* <input type="checkbox" name="partsreturn_#count1#_#count#" value="#part_returned#"<cfif #part_returned# eq "1">checked=yes</cfif>/> </td> <td> <td class="indent">Defective<input type="checkbox" name="defective_#count1#_#count#" value="#defective#"<cfif #defective# eq "1">checked=yes</cfif>/></td> </td> </tr> </table> <!---<input type="hidden" name="partscount#count#" id="partscount#count#" value="#count#">---> <!--- Shows what was previously entered for RMA Data Only ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td id="paddingformultitop"> RMA Data Only: </td> <td class="rmanmoveinmulti"> ( You may enter up to 1000 characters. ) <br/> <textarea maxlength="1000" onkeyup="return rmaismaxlength(this)" onkeydown="return rmaismaxlength(this)" rows="4" cols="60" name="rma_#count1#_#count#" >#rma_number#</textarea></td> </tr> </table> <!--- Adds Delete to every ticket ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td> <input type="button" class="removeticket" value="Remove Parts #count1#" onclick="removetheElement('part#count1#Name#count#',#count#,#count#)"></a> </td> </td> </tr> </table> </div> <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#"/> </cfloop> </div> <!---this one makes it so you can add a part to a previously submitted serial---> <input type="hidden" name="partcounter#count#" id="partcounter#count#" value="#count1#" /> </cfoutput>
Thank you,
RachComment
-
That's good except that the cfoutput should be outside the template (in the cfif serial record count check where the template is called the second time).
For the parts, create another template with the parts div (div#count1#Nam e#count#) with counts and fields, etc. in the serial template.Comment
-
Hey Acoder,
So are you saying something like this
Code:<cfset count = 0> <cfoutput query="serial"> <cfset count = count + 1> <cfset model_no = #model_no#> <cfset product_type = #product_type#> <cfset type_hardware_failure = #type_hardware_failure#> <cfset software_hardware = #software_hardware#> <cfset resolution_verified_by = #resolution_verified_by#> <cfset dept_responsibility = #dept_responsibility#> <cfinclude template="serialpartsdisplay.cfm"> <cfif serial.recordcount is 0> <cfset count = 1> <cfset model_no = ""> <cfset product_type = ""> <cfset type_hardware_failure = ""> <cfset pka_serialNo = ""> <cfset software_hardware = ""> <cfset description = ""> <cfset resolution = ""> <cfset resolution_date = ""> <cfset resolution_verified_by = ""> <cfset verification_date = ""> <cfset dept_responsibility = ""> <cfinclude template="serialpartsdisplay.cfm"> </cfif> </cfoutput>
Code:<!---Shows what was previously entered into parts table---> <!---dbtype="query"---> <cfquery name="getparts" dbtype="query" > SELECT * FROM parts WHERE fk_serialNo=<cfqueryparam value="#pka_serialNo#" cfsqltype="cf_sql_char" maxLength="20"> </cfquery> <cfset count1 = 0> <!---<cfif serial.recordcount is 0>---> <cfloop query="getparts"> <cfset count1 = count1 + 1> <cfinclude template="parts.cfm"> <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#"/> </cfloop>
Code:<div id="part#count1#Name#count#"> <!---<cfset partliststr = ""> <cfloop from="1" to="#count1#" index="pl"> <cfset partliststr = partliststr & #pl# & ","> </cfloop> <input type="hidden" name="part2count#count#" id="part2count#count#" value="#partliststr#"> <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#">---> <!---THIS IS THE PARTS SECTION---> <input type="hidden" name="pkpartID_#count1#_#count#" id="pkpartID" value="#pk_partID#" /> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <th class="sectiontitle" colspan="7">Parts Information #count1# Serial Information #count#</th> <tr> <td class='indent' id='formfieldpadding'>HC P/N: <input type='text' name="hcpn_#count1#_#count#" style="margin:0px" value="#hc_partNo#"></td> <td> Parts been returned* <input type="checkbox" name="partsreturn_#count1#_#count#" value="#part_returned#"<cfif #part_returned# eq "1">checked=yes</cfif>/> </td> <td> <td class="indent">Defective<input type="checkbox" name="defective_#count1#_#count#" value="#defective#"<cfif #defective# eq "1">checked=yes</cfif>/></td> </td> </tr> </table> <!---<input type="hidden" name="partscount#count#" id="partscount#count#" value="#count#">---> <!--- Shows what was previously entered for RMA Data Only ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td id="paddingformultitop"> RMA Data Only: </td> <td class="rmanmoveinmulti"> ( You may enter up to 1000 characters. ) <br/> <textarea maxlength="1000" onkeyup="return rmaismaxlength(this)" onkeydown="return rmaismaxlength(this)" rows="4" cols="60" name="rma_#count1#_#count#" >#rma_number#</textarea></td> </tr> </table> <!--- Adds Delete to every ticket ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td> <input type="button" class="removeticket" value="Remove Parts #count1#" onclick="removetheElement('part#count1#Name#count#',#count#,#count#)"></a> </td> </td> </tr> </table> </div>
an here is whats on the main page under neath all the cfif
Code:cfset count1 = 0> <cfoutput query="parts"> <cfset count1 = count1 + 1> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset rma_number = #rma_number#> <cfinclude template="parts.cfm"> </cfoutput> <cfif parts.recordcount is 0> <cfset count1 = 1> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset rma_number = ""> <cfinclude template="parts.cfm"> </cfif>
RachComment
-
You shouldn't need the parts in two places. If it's in the serial template (where it should be), it's not needed on the main page.
For the serials, the cfoutput loop should be complete before the cfif. Then in the cfif record count tag, put cfoutput tags.Comment
-
Hey Acoder,
So your saying something like this correct?
Code:<cfset count = 0> <cfoutput query="serial"> <cfset count = count + 1> <cfset model_no = #model_no#> <cfset product_type = #product_type#> <cfset type_hardware_failure = #type_hardware_failure#> <cfset software_hardware = #software_hardware#> <cfset resolution_verified_by = #resolution_verified_by#> <cfset dept_responsibility = #dept_responsibility#> <cfinclude template="serialpartsdisplay.cfm"> </cfoutput> <cfoutput> <cfif serial.recordcount is 0> <cfset count = 1> <cfset model_no = ""> <cfset product_type = ""> <cfset type_hardware_failure = ""> <cfset pka_serialNo = ""> <cfset software_hardware = ""> <cfset description = ""> <cfset resolution = ""> <cfset resolution_date = ""> <cfset resolution_verified_by = ""> <cfset verification_date = ""> <cfset dept_responsibility = ""> <cfinclude template="serialpartsdisplay.cfm"> </cfif> </cfoutput>
Thank you,
RachComment
-
Hey Acoder,
So would this be correct for serial and parts?
Code:<cfset count = 0> <cfoutput query="serial"> <cfset count = count + 1> <cfset model_no = #model_no#> <cfset product_type = #product_type#> <cfset type_hardware_failure = #type_hardware_failure#> <cfset software_hardware = #software_hardware#> <cfset resolution_verified_by = #resolution_verified_by#> <cfset dept_responsibility = #dept_responsibility#> <cfinclude template="serialpartsdisplay.cfm"> </cfoutput> <!--- If fields in the serial was not added it shows the blank field/ or it will show the whole table if no serial was submitted (parts table works the same way). parts is in serialpartsdisplay.cfm---> <cfif serial.recordcount is 0> <cfset count = 1> <cfset model_no = ""> <cfset product_type = ""> <cfset type_hardware_failure = ""> <cfset pka_serialNo = ""> <cfset software_hardware = ""> <cfset description = ""> <cfset resolution = ""> <cfset resolution_date = ""> <cfset resolution_verified_by = ""> <cfset verification_date = ""> <cfset dept_responsibility = ""> <cfoutput><cfinclude template="serialpartsdisplay.cfm"></cfoutput> </cfif> <cfset count1 = 0> <cfoutput query="parts"> <cfset count1 = count1 + 1> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset rma_number = #rma_number#> <cfinclude template="parts.cfm"> </cfoutput> <cfif parts.recordcount is 0> <cfset count = 1> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset rma_number = ""> <cfoutput><cfinclude template="parts.cfm"></cfoutput> </cfif>
RachComment
-
Hey Acoder ,
would something like this work?
Code:<cfset count = 0> <cfoutput query="serial"> <cfset count = count + 1> <cfset model_no = #model_no#> <cfset product_type = #product_type#> <cfset type_hardware_failure = #type_hardware_failure#> <cfset software_hardware = #software_hardware#> <cfset resolution_verified_by = #resolution_verified_by#> <cfset dept_responsibility = #dept_responsibility#> <cfinclude template="serialpartsdisplay.cfm"> </cfoutput> <cfset count1 = 0> <cfoutput query="parts"> <cfset count1 = count1 + 1> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset rma_number = #rma_number#> <cfinclude template="parts.cfm"> </cfoutput> <!--- If fields in the serial was not added it shows the blank field/ or it will show the whole table if no serial was submitted (parts table works the same way). parts is in serialpartsdisplay.cfm---> <cfif serial.recordcount is 0> <cfset count = 1> <cfset model_no = ""> <cfset product_type = ""> <cfset type_hardware_failure = ""> <cfset pka_serialNo = ""> <cfset software_hardware = ""> <cfset description = ""> <cfset resolution = ""> <cfset resolution_date = ""> <cfset resolution_verified_by = ""> <cfset verification_date = ""> <cfset dept_responsibility = ""> <cfoutput><cfinclude template="serialpartsdisplay.cfm"></cfoutput> </cfif> <cfif parts.recordcount is 0> <cfset count1 = 1> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset rma_number = ""> <cfoutput><cfinclude template="parts.cfm"></cfoutput> </cfif>
Thank you,
RachComment
-
Hey Acoder,
I tried putting it at the end an it didn't work. An i tried putting it in the following place below an it had a fit about the cfoutput. any ideas on where to put it?
Code:<cfquery name="getparts" dbtype="query" > SELECT * FROM parts WHERE fk_serialNo=<cfqueryparam value="#pka_serialNo#" cfsqltype="cf_sql_char" maxLength="20"> </cfquery> <cfset count1 = 0> <!---<cfif serial.recordcount is 0>---> <cfloop query="getparts"> <cfset count1 = count1 + 1> Tried to put it here <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#"/> </cfloop>
Code:<!---IF HAVE ANY BLANKS IN ANY FIELDS THIS MAKES IT SO THE FIELD WILL SHOW UP---> <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure ---> <cfoutput> <div id="dynamic#count#Input"> <table class="zpExpandedTable" id="modeltable"> <th class="sectiontitletick" colspan="7"> Serial Information #count# </th> <tr> <td id="paddingformultitop">Model No: </td> </td> <td> <select name="modelno_#count#"> <option value="">Make A Selection</option> <cfloop query="models"> <option value="#model#"<cfif #model# is #model_no#>selected</cfif>>#model#</option> </cfloop> </select></td> <td> Product Type: </td> <td> <select name="producttype_#count#"> <option value="" selected>No Choice</option> <cfloop query="getProdType"> <option value="#pk_productType#"<cfif #pk_productType# is #product_type#>selected</cfif>>#pk_productType#</option> </cfloop> </select> </td> <td class="red"> Type Of Hardware Failure*: </td> <td> <select name="hardwarefailure_#count#"> <option value="" selected>Make A Selection</option> <cfloop query="getHardwareFail"> <option value="#pk_hardwareFailure#"<cfif #pk_hardwareFailure# is #type_hardware_failure#>selected</cfif>>#pk_hardwareFailure#</option> </cfloop> </select> </td> </tr> <table> <!--- Shows what was previously entered for Serial Number and Software/Hardware ---> <table class="zpExpandedTable" id="modeltable"> <tr> <td id="paddingformultitop"> Serial Number: <input type="text" name="serialnum_#count#" value="#pka_serialNo#"> Software/Hardware: <select name="softhardware_#count#"> <option value="" selected>No Choice</option> <cfloop query="getSoftHard"> <option value="#pk_softwareHardware#"<cfif #pk_softwareHardware# is #software_hardware#>selected</cfif>>#pk_softwareHardware#</option> </cfloop> </select> </td> </tr> </table> <!--- Shows what was previously entered for Description ---> <cfquery name="getnotes" dbtype="query" > SELECT * FROM notes WHERE fk_serialNo=<cfqueryparam value="#pka_serialNo#" cfsqltype="cf_sql_char" maxLength="20"> </cfquery> <cfloop query="getnotes"> <input type="hidden" name="pk_num_#count#" id="pk_num" value="" /></cfloop> <!---<div style="width: 150px; height: 150px; overflow-y: scroll; scrollbar-arrow-color:blue; scrollbar-face-color: #e7e7e7; scrollbar-3dlight-color: #a0a0a0; scrollbar-darkshadow-color:#888888;">---> <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0"> <tr><td id="paddingformutli"> Previously Submitted Descriptions:</td><td id="paddingformutli"> <div id="descriptionbox" style="HEIGHT:100px; WIDTH:500px; OVERFLOW:auto;" > <cfloop query="getnotes"> Added By: #fk_addedBy# <br/> Dated Added: #DateFormat(date_stamp,'mm/dd/yyyy')#<br/><br/> #description# <div id="line"></div> </cfloop></div></td> </tr> </table> <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0"> <tr> <!---<input type="hidden" name="thedescriptoin_#count#" id="thedescriptoin" value="#description#" />---> <td id="paddingformutli"> Description: </td> <td class="descriptionmoveinmulti"> ( You may enter up to 1000 characters. ) <br> <textarea maxlength='1000' onkeyup='return descriptionmaxlength(this)' onkeydown='return descriptionmaxlength(this)'rows='4' cols='60' name="thedescription_#count#"></textarea> </td> </tr> </table> <!---Shows what was previously entered for Resolution ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td id="paddingformutli"> Resolution: </td> <td class="resolutionmoveinmulti"> ( You may enter up to 1500 characters. ) <br> <textarea maxlength="1500" onkeyup="return resolutionismaxlength(this)" onkeydown="return resolutionismaxlength(this)" rows="4" cols="60" name="resolution_#count#">#resolution#</textarea> </td> </tr> </table> <!--- Shows what was previously entered for Resolution Date, Current Date (for resolution date) and resolution vertified as effective by ---> <table class="zpExpandedTable" id="resoldatetab" cellpadding="1" cellspacing="0"> <tr> <td id="paddingformultitop"> Resolution Date: (MM/DD/YYYY) </td> <td> <input type="text" name="resdate_#count#" value="#DateFormat(resolution_date,'mm/dd/yyyy')#"> Current Date: <input type="checkbox" name="currentdateresol_#count#" onClick="resdate_#count#.value=fill_date()"> </td> <td> Resolution Verified as effective by: </td> <td> <select name="resvertified_#count#"> <option value="" selected>Make A Selection</option> <cfloop query="gettech"> <option value="#fname# #lname#"<cfif "#fname# #lname#" is #resolution_verified_by#> selected</cfif>>#fname# #lname#</option> </cfloop> </select> </td> </tr> </table> <!--- Shows what was previously entered for Vertification Date, Current Date (for vertification date) ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td id="paddingformultitop"> Verification Date: (MM/DD/YYYY) </td> <td class="vertificationmoveinmulti"> <input type="text" name="vertifidate_#count#" value="#DateFormat(verification_date,'mm/dd/yyyy')#"> Current Date: <input type="checkbox" name="currentdatevert_#count#" onClick="vertifidate_#count#.value=fill_date()"> </td> </tr> </table> <!--- Shows what was previously entered for Dept/Vendor Responsibility ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td class="red" id="paddingformultitop"> Dept/Vendor Responsibility*: <select name="deptvendor_#count#"> <option value="" selected>Make A Selection</option> <cfloop query="getDeptVendor"> <option value="#pk_deptVendor#"<cfif #pk_deptVendor# is #dept_responsibility#>selected</cfif>>#pk_deptVendor#</option> </cfloop> </select> </td> </tr> </table> <input type="hidden" name="serialcount" id="serialcount" value="#count#"> <!--- Adds Delete to every ticket ---> <table class="zpExpandedTable" id="resoltable" cellpadding="1" cellspacing="0"> <tr> <td> <input type="button" class="removeticket" value="Remove Serial #count#" onClick="removeElement('dynamic#count#Input')"> </td> </tr> <tr> <td> <input type="button" class="addticket" value="Add Parts" onClick="addpartInput('dynamic#count#Input')"> </td> </tr> </table> <!---Shows what was previously entered into parts table---> <!---dbtype="query"---> <cfquery name="getparts" dbtype="query" > SELECT * FROM parts WHERE fk_serialNo=<cfqueryparam value="#pka_serialNo#" cfsqltype="cf_sql_char" maxLength="20"> </cfquery> <cfset count1 = 0> <!---<cfif serial.recordcount is 0>---> <cfloop query="getparts"> <cfset count1 = count1 + 1> <!---The template is where most of the parts section is held---> <!---<cfinclude template="partsdisplay.cfm">---> <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#"/> </cfloop> </div> <!---this one makes it so you can add a part to a previously submitted serial---> <input type="hidden" name="partcounter#count#" id="partcounter#count#" value="#count1#" /> </cfoutput>
RachComment
-
Hey Acoder,
I tried the following but it still didn't work.i changed the last cftemplate from cfoutput to cfloop because it has having problems being inside another cfoutput. But the thing is the parts section does not come up. Any ideas?
Code:<cfquery name="getparts" dbtype="query" > SELECT * FROM parts WHERE fk_serialNo=<cfqueryparam value="#pka_serialNo#" cfsqltype="cf_sql_char" maxLength="20"> </cfquery> <cfset count1 = 0> <!---<cfif serial.recordcount is 0>---> <cfloop query="getparts"> <cfset count1 = count1 + 1> <!---The template is where most of the parts section is held---> <!---<cfinclude template="partsdisplay.cfm">---> <cfset count1 = 0> <cfloop query="getparts"> <cfset count1 = count1 + 1> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset rma_number = #rma_number#> <cfinclude template="partsdisplay.cfm"> </cfloop> <cfif getparts.recordcount is 0> <cfset count1 = 1> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset rma_number = ""> <cfloop query="getparts"><cfinclude template="partsdisplay.cfm"></cfloop> </cfif> <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#"/> </cfloop>
RachComment
-
You don't need the cfloop tag on line 9 and the cfset on line 10. Neither do you need the ending cfloop on line 31. You also don't need the cfloop tags on line 28. On line 30, the input hidden field will probably be in the partsdisplay.cf m template, so you can remove that line too.Comment
Comment