displaying previously entered multiple fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bonneylake
    Contributor
    • Aug 2008
    • 769

    Originally posted by acoder
    Do all the serials get deleted? Check the serialnum_1, etc. fields on the previous page (edit).
    Hey Acoder,

    I am an idiot! I figured it out. I was messing around with stuff yesterday an i realized that i had somehow deleted the serialcount from my div (not sure how). But anyway it works like it suppose to it deletes the description when i delete the serial so i am SOOOO SORRY for the last however many posts related to this problem :(. But If you wouldnt mind just 2 more quick questions i would really really appreciate it :).

    I was wondering how i could make it where if someone didn't fill out the description field it would not insert a row into the table? Right now no matter what it will still insert something for description even if i don't write a description.I was able to make it where if any of the fields for serial was not filled out it would not insert a row by using the following <cfparam name="Form.seri alcount" default=""> but not sure how i could do description. here is what i am using for description

    Code:
    <cfquery name="description" datasource="CustomerSupport">
        exec usp_CS_Insertdescription
       <cfqueryparam value="#serialnum#" CFSQLType = "CF_SQL_VARCHAR">,
       '#Form.ID#',
       <cfqueryparam value="#thedescription#" CFSQLType = "CF_SQL_VARCHAR">,
       '#Form.fk_addedBy#'
    </cfquery>
    an the last question. Well you know how we had talked about blank fields. Where if a user does not fill out a serial or part it would still show a blank serial section an blank park section using a cfinclude template? well this part works find except the count is screwed up. When the first record comes up it says serial 1 information (like its suppose to) however when i go an add a serial it also says serial 1 information to. Instead of one saying serial 1 information an the new one i am adding saying serial 2 information. here is what i am using. I know it has to do with theValue but i am not sure if i could just remove it out of serialpartsdisp lay.cfm an it would work or not?

    Code:
    <!---IF HAVE ANY BLANKS IN ANY FIELDS THIS MAKES IT SO THE FIELD WILL SHOW UP--->
    
    <cfif serial.recordcount is 0>  
    <!---<cfset count = 0>--->
    <cfset count = count + 1>
    <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:&nbsp;&nbsp;&nbsp;&nbsp;</td>
    </td>
    <td>
    <select name="modelno_#count#">
    <option value="">Make A Selection</option>
    <cfloop query="models">
    <option value="#model#">#model#</option>
    
    </cfloop> 
    </select>
    
    </td>
    <td>
    &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
    </td>
    <td>
    <select name="producttype_#count#">
    <option value="" selected>No Choice</option>
    <cfloop query="getProdType">
    <option value="#pk_productType#">#pk_productType#</option> 
    </cfloop>
    </select>
    </td>
    <td class="red'">
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
    </td>
    <td>
    <select name="hardwarefailure_#count#">
    <option value="" selected>Make A Selection</option>
    <cfloop query="getHardwareFail">
    <option value="#pk_hardwareFailure#">#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:&nbsp;&nbsp;
    <input type="text" name="serialnum_#count#" value="">
    &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
    <select name="softhardware_#count#">
    <option value="" selected>No Choice</option>
    <cfloop query="getSoftHard">
    <option value="#pk_softwareHardware#">#pk_softwareHardware#</option>
    </cfloop>
    </select>
    </td>
    </tr>
    </table>
    
    <!--- Shows what was previously entered for Description ---> 
     
    <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
    <tr>
    <td id="paddingformutli">
    Description:&nbsp;&nbsp;
    </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:&nbsp;&nbsp;
    </td>
    <td class="resolutionmoveinmulti">
    ( You may enter up to 1500 characters. )
    <br>
    <textarea maxlength='1500' onkeyup='return resolutionmaxlength(this)' onkeydown='return resolutionmaxlength(this)' rows='4' cols='60' name="resolution_#count#"></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:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
    </td>
    <td>
    <input type="text" name="resdate_#count#" value="">&nbsp;&nbsp;
     
    &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
    <input type="checkbox" name="currentdateresol_#count#" 
    onClick="resdate_#count#.value=fill_date()">
    
    </td>
    <td>
    Resolution Verified as effective by:&nbsp;&nbsp;
    </td>
    <td>
    <select name="resvertified_#count#">
    <option value="" selected>Make A Selection</option>
    <cfloop query="gettech">
    <option value="#fname# #lname#">#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:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
    </td>
    <td class="vertificationmoveinmulti">
    <input type="text" name="vertifidate_#count#" value="">&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
    <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*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <select name="deptvendor_#count#">
    <option value="" selected>Make A Selection</option>
    <cfloop query="getDeptVendor">
    <option value="#pk_deptVendor#">#pk_deptVendor#</option>
    </cfloop>
    </select>
    </td>
    </tr>
    </table>
    
    <input type="hidden" name="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>
    
    <cfset count1 = 0>
    <cfif parts.recordcount is 0> 
    <cfset count1 = count1 + 1>
    <div id="part#count1#Name#count#">
    <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:&nbsp;&nbsp;&nbsp;<input type='text' name="hcpn_#count1#_#count#" style="margin:0px" value=""></td>
    <td>
    Parts been returned*
    <input type="checkbox" name="partsreturn_#count1#_#count#" value=""<cfif #part_returned# eq "1">checked=yes</cfif>/>
    </td>
    <td>
    <td class="indent">Defective<input type="checkbox" name="defective_#count1#_#count#" value=""<cfif #defective# eq "1">checked=yes</cfif>/></td>
    </td>
    </tr>
    </table>
    <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#">
    
    <!--- 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:&nbsp;&nbsp;&nbsp;&nbsp;
    </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#" ></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#')"></a>
    </td>
    </td>
    </tr>
    </table>
    <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#"/>
    </div>
    </cfif>
    <input type="hidden" name="partcounter#count#" id="partcounter#count#" value="#count1#" />
    </div>
    
    </cfoutput>
    <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
    
    </cfif>
    Thank you so much for all the help!!! sorry again for the posts related to this problem :(
    Rach

    Comment

    • acoder
      Recognized Expert MVP
      • Nov 2006
      • 16032

      Originally posted by bonneylake
      so i am SOOOO SORRY for the last however many posts related to this problem :(
      It's OK. It can happen, though you should keep backups of previous working versions that you can go back to.
      Originally posted by bonneylake
      I was wondering how i could make it where if someone didn't fill out the description field it would not insert a row into the table?
      Use a cfparam for thedescription and if it's empty, don't insert.
      Originally posted by bonneylake
      an the last question. Well you know how we had talked about blank fields. Where if a user does not fill out a serial or part it would still show a blank serial section an blank park section using a cfinclude template? [...]I know it has to do with theValue but i am not sure if i could just remove it out of serialpartsdisp lay.cfm an it would work or not?
      Yeah, it looks like the theValue field is the problem. It shouldn't be in the cfinclude template file.

      Comment

      • bonneylake
        Contributor
        • Aug 2008
        • 769

        Hey Acoder,

        Well i tried the cfparam but it still inserted a record. But it inserted it like the following.

        pk_num fk_serialNo fk_ticketNo description date_stamp
        111 1 60 nov/24/08

        anything else i can try?

        an i took out the following on my serialpartsdisp lay.cfm. But it still is not counting right. Basically when it comes up it says the template is serial information 1. An when i go to add a serial it says its serial information 1. Any ideas on how i could get it to count right?

        Code:
        <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
        Thank you :),
        Rach

        Comment

        • bonneylake
          Contributor
          • Aug 2008
          • 769

          Hey Acoder,

          I figured out both. I needed to move the following line underneath the template link an take the one in the template out.

          Code:
          <input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />
          but thank you so much for all the help. You have no idea how much i appreciate all the help you have given me an how much i have learned from you!!! THANK YOU THANK YOU FOR ALL THE HELP!!!

          Thank you again :)!!!!
          Rach

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            That's great! Well done and you're of course welcome any time.

            The end of a very long journey ;)

            Comment

            • bonneylake
              Contributor
              • Aug 2008
              • 769

              Hey Acoder,

              I thought the journey was over but i got one last final problem. I was running tests today to make sure everything should be good an i noticed a problem. When i went to edit i did a test of the following

              serial 1
              part 1
              serial 2
              serial 3
              serial 4
              part 1

              when i submitted it on my printed ticket it showed it as the following

              serial 1
              part 1
              part 1
              serial 2
              serial 3
              serial 4
              part 1

              the parts for serial 1 is the same part. But then when i went to go back an edit the ticket again it didn't show any of the parts with any of the serials.it just showed the serials.i had noticed this problem the other day but i thought it was gone after doing many tests. But i guess it still there. Here is what i got
              Code:
                <div id="dynamicInput"> 
                   <!--- All Ticket Information Appears Here--->
               
              
              
              
              <!---<cfif serial.recordcount is 0>--->
              <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#>
              
               <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
              
              <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:&nbsp;&nbsp;&nbsp;&nbsp;</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>
              &nbsp;&nbsp;&nbsp;&nbsp;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">
              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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:&nbsp;&nbsp;
              <input type="text" name="serialnum_#count#" value="#pka_serialNo#">
              &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
              <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="#pk_num#" /></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:&nbsp;&nbsp;
              </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:&nbsp;&nbsp;
              </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:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
              </td>
              <td>
              <input type="text" name="resdate_#count#" value="#DateFormat(resolution_date,'mm/dd/yyyy')#">&nbsp;&nbsp;
              &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
              <input type="checkbox" name="currentdateresol_#count#" 
              onClick="resdate_#count#.value=fill_date()">
              </td>
              <td>
              Resolution Verified as effective by:&nbsp;&nbsp;
              </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:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
              </td>
              <td class="vertificationmoveinmulti">
              <input type="text" name="vertifidate_#count#" value="#DateFormat(verification_date,'mm/dd/yyyy')#">&nbsp;&nbsp;
              &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
              <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*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <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:&nbsp;&nbsp;&nbsp;<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:&nbsp;&nbsp;&nbsp;&nbsp;
              </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>
              
              
              
              
              
              <!---If have any blanks in serial table it will make field appear--->
              <cfoutput query="serial">
              <cfset model_no = #model_no#>
              <cfset product_type = #product_type#>
              <cfset type_hardware_failure = #type_hardware_failure#>
              <cfset pka_serialNo = #pka_serialNo#>
              <cfset software_hardware = #software_hardware#>
              <cfloop query="getnotes">
              <cfset description = #description#></cfloop>
              <cfset resolution = #resolution#>
              <cfset resolution_date = #resolution_date#>
              <cfset resolution_verified_by = #resolution_verified_by#>
              <cfset verification_date = #verification_date#>
              <cfset dept_responsibility = #dept_responsibility#>
              </cfoutput>
              <cfif serial.recordcount is 0>
              <cfset model_no = "">
              <cfset product_type = "">
              <cfset type_hardware_failure = "">
              <cfset pka_serialNo = "">
              <cfset software_hardware = "">
              <!---<cfif getnotes.recordcount is 0>
              <cfset description = ""></cfif>--->
              <cfset resolution = "">
              <cfset resolution_date = "">
              <cfset resolution_verified_by = "">
              <cfset verification_date = "">
              <cfset dept_responsibility = "">
              <cfinclude template="serialpartsdisplay.cfm">
              </cfif>
              
              <!---Parts Information, display parts if have or don't have a value--->
              <cfoutput query="parts">
              <cfset hc_partNo = #hc_partNo#>
              <cfset part_returned = #part_returned#>
              <cfset defective = #defective#>
              <cfset rma_number = #rma_number#>
              <!---<cfinclude template="partsdisplay.cfm">--->
              </cfoutput>
              <cfif parts.recordcount is 0>
              <cfset hc_partNo = "">
              <cfset part_returned = "">
              <cfset defective = "">
              <cfset rma_number = "">
              <!---<cfinclude template="partsdisplay.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');" >
              i also tried to just to insert a new serial as the example i gave above an i came back to look at the edit page an it came back as

              serial 2
              serial 3
              serial 4
              part 1
              serial 1
              part 1

              the parts are with the correct serial just the serials are not in the correct order that it was submitted.

              Thank you,
              Rach

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                Can you remember the changes that you've made to this page since it worked, i.e. when this problem didn't occur?

                There seems to be two problems here. One is that it's displaying duplicate parts and the second problem is that all parts are disappearing.

                In the example, did you delete any parts? What were the exact steps that you took to produce that scenario?

                Comment

                • bonneylake
                  Contributor
                  • Aug 2008
                  • 769

                  Hey Acoder,

                  Well to be honest with you i have been having this problem, just at the time i was having the problem we was stiill working on it so i figure i wait to ask. But then of course i forgot about it an now when i am testing it came back up an i went oh yeah. But anyway ok for the 2 tests.

                  The first test. The first one i had originally submitted one serial and one part. When i went to edit i deleted them both an submitted (was testing everything this morning to make sure no problems with updating/deleteing an inserting). Anyway i went back to the edit again i an i did the following

                  serial 1
                  part 1
                  serial 2
                  serial 3
                  serial 4
                  part 1

                  and i submitted an that was when i saw the duplicate part for serial 1 on my printticketedit .cfm page. I then went back to edit again an i noticed that none of the parts where there.

                  the second test i did all i did was insert the following (didn't delete).

                  serial 1
                  part 1
                  serial 2
                  serial 3
                  serial 4
                  part 1

                  On my printticket.cfm page it looked great. When i went to the edit page it came back as

                  serial 2
                  serial 3
                  serial 4
                  part 1
                  serial 1
                  part 1

                  the serials where with the correct part just the serials where not in the correct order.

                  i think i figured it out. Its displaying the serials based on the name. I did a 3rd test just now. For the serials i had the following names
                  s2
                  s3
                  s4
                  part 4
                  serial 1
                  p1

                  when i changed the name from serial 1 to s1 it put it in the correct order which is

                  s1
                  p1
                  s2
                  s3
                  s4
                  part 4

                  is there anyway to make the results come back as they were inserted an not based on alphabetical order?

                  Thank you,
                  Rach

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    The second scenario looks easier (inserts only). Try adding an ORDER BY clause to your queries to avoid problems with retrieving data. The obvious field to order by would be the unique ID.

                    Edit: I see you edited your post. To answer that, by serial and parts IDs.

                    Comment

                    • bonneylake
                      Contributor
                      • Aug 2008
                      • 769

                      Hey Acoder,

                      well i think its just going to remain as it is because it doesn't really have a unique field. I tried ordering by pka_serialNo and also tried pkb_fk_ticketNo and it still ordered in alphabetical order (from the looks of it, it inserts in alphabetical order)

                      but on the parts problem i think i know what the problem is. I was able to duplicate the problem. Remember how if no serial/part is inserted the template comes up? well the template is somehow causing the duplicate. Because when i added 1 part to that first serial it made it duplicate. But i am not sure how to discontinue this problem. An its the only time this problem appears.Here is what on got on the template.

                      Code:
                      <!---IF HAVE ANY BLANKS IN ANY FIELDS THIS MAKES IT SO THE FIELD WILL SHOW UP--->
                      
                      <cfif serial.recordcount is 0>  
                      <!---<cfset count = 0>--->
                      <cfset count = count + 1>
                      <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:&nbsp;&nbsp;&nbsp;&nbsp;</td>
                      </td>
                      <td>
                      <select name="modelno_#count#">
                      <option value="">Make A Selection</option>
                      <cfloop query="models">
                      <option value="#model#">#model#</option>
                      
                      </cfloop> 
                      </select>
                      
                      </td>
                      <td>
                      &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
                      </td>
                      <td>
                      <select name="producttype_#count#">
                      <option value="" selected>No Choice</option>
                      <cfloop query="getProdType">
                      <option value="#pk_productType#">#pk_productType#</option> 
                      </cfloop>
                      </select>
                      </td>
                      <td class="red">
                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      Type Of Hardware Failure*:
                      </td>
                      <td>
                      <select name="hardwarefailure_#count#">
                      <option value="" selected>Make A Selection</option>
                      <cfloop query="getHardwareFail">
                      <option value="#pk_hardwareFailure#">#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:&nbsp;&nbsp;
                      <input type="text" name="serialnum_#count#" value="">
                      &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
                      <select name="softhardware_#count#">
                      <option value="" selected>No Choice</option>
                      <cfloop query="getSoftHard">
                      <option value="#pk_softwareHardware#">#pk_softwareHardware#</option>
                      </cfloop>
                      </select>
                      </td>
                      </tr>
                      </table>
                      
                      <!--- Shows what was previously entered for Description ---> 
                       
                      <table class="zpExpandedTable" id="resoltable" cellpadding="3" cellspacing="0">
                      <tr>
                      <td id="paddingformutli">
                      Description:&nbsp;&nbsp;
                      </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:&nbsp;&nbsp;
                      </td>
                      <td class="resolutionmoveinmulti">
                      ( You may enter up to 1500 characters. )
                      <br>
                      <textarea maxlength='1500' onkeyup='return resolutionmaxlength(this)' onkeydown='return resolutionmaxlength(this)' rows='4' cols='60' name="resolution_#count#"></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:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                      </td>
                      <td>
                      <input type="text" name="resdate_#count#" value="">&nbsp;&nbsp;
                       
                      &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                      <input type="checkbox" name="currentdateresol_#count#" 
                      onClick="resdate_#count#.value=fill_date()">
                      
                      </td>
                      <td>
                      Resolution Verified as effective by:&nbsp;&nbsp;
                      </td>
                      <td>
                      <select name="resvertified_#count#">
                      <option value="" selected>Make A Selection</option>
                      <cfloop query="gettech">
                      <option value="#fname# #lname#">#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:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                      </td>
                      <td class="vertificationmoveinmulti">
                      <input type="text" name="vertifidate_#count#" value="">&nbsp;&nbsp;
                      &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                      <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*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      <select name="deptvendor_#count#">
                      <option value="" selected>Make A Selection</option>
                      <cfloop query="getDeptVendor">
                      <option value="#pk_deptVendor#">#pk_deptVendor#</option>
                      </cfloop>
                      </select>
                      </td>
                      </tr>
                      </table>
                      
                      <input type="hidden" name="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>
                      
                      <cfset count1 = 0>
                      <cfif parts.recordcount is 0> 
                      <cfset count1 = count1 + 1>
                      <div id="part#count1#Name#count#">
                      <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:&nbsp;&nbsp;&nbsp;<input type='text' name="hcpn_#count1#_#count#" style="margin:0px" value=""></td>
                      <td>
                      Parts been returned*
                      <input type="checkbox" name="partsreturn_#count1#_#count#" value=""<cfif #part_returned# eq "1">checked=yes</cfif>/>
                      </td>
                      <td>
                      <td class="indent">Defective<input type="checkbox" name="defective_#count1#_#count#" value=""<cfif #defective# eq "1">checked=yes</cfif>/></td>
                      </td>
                      </tr>
                      </table>
                      <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#">
                      
                      <!--- 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:&nbsp;&nbsp;&nbsp;&nbsp;
                      </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#" ></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#')"></a>
                      </td>
                      </td>
                      </tr>
                      </table>
                      <input type="hidden" name="partscount#count#" id="partscount#count#" value="#count1#"/>
                      </div>
                      </cfif>
                      <input type="hidden" name="partcounter#count#" id="partcounter#count#" value="#count1#" />
                      </div>
                      
                      </cfoutput>
                      <!---<input type="hidden" value="<cfoutput>#count#</cfoutput>" name="theValue" id="theValue" />--->
                      
                      </cfif>
                      Thank you,
                      Rach

                      Comment

                      • acoder
                        Recognized Expert MVP
                        • Nov 2006
                        • 16032

                        For the ordering, do you not have another field, e.g. date/time which can be used?

                        I see with the template that you combined them into one. The purpose of the template was to remove the code from the main file, so that changes are only made in one place.

                        Comment

                        • bonneylake
                          Contributor
                          • Aug 2008
                          • 769

                          Hey Acoder,

                          I don't even have a date. Because the date i use for serial table is one that the user inserts an they might or might not insert that.An like i said when the fields insert into the table its inserting alphabetically. So i think i am stuck with it showing it as it is. I am just afraid they will get confused is all when they go back to look.The only way i can think of if there is a way that when they go to insert it will insert based on how it appears an not just go an put it in order because it puts it in order in the table based on the serial no. In my parts table when i inserted records as the following
                          test 1
                          part 6
                          test2
                          part 5

                          in the database it showed it was as below an the serial, ticket and pk_partID fields are not in any pacific order.
                          part 6
                          part 5

                          if there was a way to do the same thing we do to parts to serial that would work but i don't know why its not in any pacific order.

                          An i am confused on what you mean by the template. I thought the point of the template was that if a user did not insert a value into a field in the serial section or part section that this would still show those fields but empty?because remember a while back i had the trouble where if a user did not fill out a field it would not show the input field field for it at all an all i would have is for example serial number but no where to type the serial number. I am not having trouble with no input field showing up anymore. However, how its being used now (or how i have been using it) is if i a user did not fill in a serial or part when they inserted, if they go back to edit all they will see is add serial button an this makes it so that if nothing was inserted it would show a blank serial and part to fill out instead of a blank section where the serial and part should be.

                          The reason i combined them is because i was having lots of trouble with the parts ordering right.Basically for that template serial if i clicked add part it didn't order the part right at all. I tried to keep them seperate but it just kept messing up an finally putting them together made it work right. But like i said when i add one part to it, for some reason its showing duplicates on my print page. Any ideas on how to fix the duplicate?

                          Thank you,
                          Rach

                          Comment

                          • acoder
                            Recognized Expert MVP
                            • Nov 2006
                            • 16032

                            We'll leave the serial ordering for now and work on the template.

                            I understand what you're saying about the template, but when the template was created it gave the ability to use one code for both no serials and some serials (with the record count check). You should only have one version otherwise you may as well not have a template and just put the code directly in the file.

                            What I suggest you do is make a copy of the template file (to go back to if needed), and then copy the code from the main file (between the serial divs) into this template file to test. Once you have it working, you can replace all that code with this template file.

                            Comment

                            • bonneylake
                              Contributor
                              • Aug 2008
                              • 769

                              Hey Acoder,

                              Well i copied what was on cticketpage2edi t.cfm (main page) what was between the serials an this is what i have. an i did a test where i inserted a serial with a few fields filled in an some not an when i went back to look it looked great. But how would i make the whole template come up if nothing was filled in? when i tried inserting no serial, nothing came up except the add serial button.here is what i have


                              Code:
                              <!---<cfif serial.recordcount is 0>--->
                              <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#>
                              
                               <!--- Shows what was previously entered for Model No, Product Type, and Type of Hardware Failure  --->
                              
                              <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:&nbsp;&nbsp;&nbsp;&nbsp;</td>
                              </td>
                              <td>
                              <select name="modelno_#count#">
                              <option value="">Make A Selection</option>
                              <cfloop query="models">
                              <option value="#model#">#model#</option>
                              </cfloop> 
                              </select>
                              </td>
                              <td>
                              &nbsp;&nbsp;&nbsp;&nbsp;Product Type:
                              </td>
                              <td>
                              <select name="producttype_#count#">
                              <option value="" selected>No Choice</option>
                              <cfloop query="getProdType">
                              <option value="#pk_productType#">#pk_productType#</option> 
                              </cfloop>
                              </select>
                              </td>
                              <td class="red">
                              &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Type Of Hardware Failure*:
                              </td>
                              <td>
                              
                              <select name="hardwarefailure_#count#">
                              <option value="" selected>Make A Selection</option>
                              <cfloop query="getHardwareFail">
                              <option value="#pk_hardwareFailure#">#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:&nbsp;&nbsp;
                              <input type="text" name="serialnum_#count#" value="">
                              &nbsp;&nbsp;&nbsp;&nbsp;Software/Hardware:&nbsp;&nbsp;
                              <select name="softhardware_#count#">
                              <option value="" selected>No Choice</option>
                              <cfloop query="getSoftHard">
                              <option value="#pk_softwareHardware#">#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:  <br/>
                              Dated Added: <br/><br/>
                              <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:&nbsp;&nbsp;
                              </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:&nbsp;&nbsp;
                              </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#"></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:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                              </td>
                              <td>
                              <input type="text" name="resdate_#count#" value="">&nbsp;&nbsp;
                              &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                              <input type="checkbox" name="currentdateresol_#count#" 
                              onClick="resdate_#count#.value=fill_date()">
                              </td>
                              <td>
                              Resolution Verified as effective by:&nbsp;&nbsp;
                              </td>
                              <td>
                              <select name="resvertified_#count#">
                              <option value="" selected>Make A Selection</option>
                              <cfloop query="gettech">
                              <option value="#fname# #lname#">#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:&nbsp;(MM/DD/YYYY)&nbsp;&nbsp;
                              </td>
                              <td class="vertificationmoveinmulti">
                              <input type="text" name="vertifidate_#count#" value="">&nbsp;&nbsp;
                              &nbsp;&nbsp;&nbsp;&nbsp;Current Date:&nbsp;&nbsp;
                              <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*:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                              <select name="deptvendor_#count#">
                              <option value="" selected>Make A Selection</option>
                              <cfloop query="getDeptVendor">
                              <option value="#pk_deptVendor#">#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="" />
                              
                              <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:&nbsp;&nbsp;&nbsp;<input type='text' name="hcpn_#count1#_#count#" style="margin:0px" value=""></td>
                              <td>
                              Parts been returned*
                              <input type="checkbox" name="partsreturn_#count1#_#count#" value=""/>
                              </td>
                              <td>
                              <td class="indent">Defective<input type="checkbox" name="defective_#count1#_#count#"/></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:&nbsp;&nbsp;&nbsp;&nbsp;
                              </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#" ></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>
                              heres that part on the cticketpage2edi t.cfm

                              Code:
                              <!---If have any blanks in serial table it will make field appear--->
                              <cfoutput query="serial">
                              <cfset model_no = #model_no#>
                              <cfset product_type = #product_type#>
                              <cfset type_hardware_failure = #type_hardware_failure#>
                              <cfset pka_serialNo = #pka_serialNo#>
                              <cfset software_hardware = #software_hardware#>
                              <cfloop query="getnotes">
                              <cfset description = #description#></cfloop>
                              <cfset resolution = #resolution#>
                              <cfset resolution_date = #resolution_date#>
                              <cfset resolution_verified_by = #resolution_verified_by#>
                              <cfset verification_date = #verification_date#>
                              <cfset dept_responsibility = #dept_responsibility#>
                              </cfoutput>
                              <cfif serial.recordcount is 0>
                              <cfset model_no = "">
                              <cfset product_type = "">
                              <cfset type_hardware_failure = "">
                              <cfset pka_serialNo = "">
                              <cfset software_hardware = "">
                              <!---<cfif getnotes.recordcount is 0>
                              <cfset description = ""></cfif>--->
                              <cfset resolution = "">
                              <cfset resolution_date = "">
                              <cfset resolution_verified_by = "">
                              <cfset verification_date = "">
                              <cfset dept_responsibility = "">
                              <cfinclude template="serialpartsdisplaytest.cfm">
                              </cfif>
                              
                              <!---Parts Information, display parts if have or don't have a value--->
                              <cfoutput query="parts">
                              <cfset hc_partNo = #hc_partNo#>
                              <cfset part_returned = #part_returned#>
                              <cfset defective = #defective#>
                              <cfset rma_number = #rma_number#>
                              <!---<cfinclude template="partsdisplay.cfm">--->
                              </cfoutput>
                              <cfif parts.recordcount is 0>
                              <cfset hc_partNo = "">
                              <cfset part_returned = "">
                              <cfset defective = "">
                              <cfset rma_number = "">
                              <!---<cfinclude template="partsdisplay.cfm">--->
                              </cfif>
                              Thank you,
                              Rach

                              Comment

                              • acoder
                                Recognized Expert MVP
                                • Nov 2006
                                • 16032

                                It should be from the div on line 14 onwards, not all of the code.

                                Comment

                                Working...