OK, remove the <cfoutput> from around <cfinclude> and see if that makes a difference.
URL Method for 3 tables?
Collapse
X
-
Hey Acoder,
Alrighty this is kinda weird to explain. When i look at a record that has no values its having a problem with the first drop down box (part_returned) that appears saying it cant determine value of parameter.
If i look at a record that has values applied to it, all the fields work except
the #hc_partNo#, #followup_date# , and #number_onsite# .
Here is what i have on the main page
Code:<cfoutput query="ticket"> <cfset followup_date = #followup_date#> <cfset onsite_flag = #onsite_flag#> <cfset number_onsite = #number_onsite#> </cfoutput> <cfoutput query="parts"> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset submission = #submission#> </cfoutput> <cfinclude template="partsdisplay.cfm">
Code:<table class="createticketables" id="spaceup" > <th class="sectiontitle" colspan="7">Parts Information</th> <tr> <td class="indent" id="formfieldpadding">HC P/N: <input type="text" name="hcpn" style="margin:0px" value="#hc_partNo#"></td> <td class="red"> Have all parts been returned* <select name="partsreturn" id="partsreturn"> <option value="" selected>Make A Selection</option> <option value="N/A"<cfif #part_returned# is "N/A">selected</cfif>>N/A</option> <option value="No"<cfif #part_returned# is "No">selected</cfif>>No</option> <option value="Yes"<cfif #part_returned# is "Yes">selected</cfif>>Yes</option> </select> </td> <td> <td class="indent">Defective<input type="checkbox" name="defective" value="#defective#"<cfif #defective# eq "1">checked=yes</cfif>/></td> </td> </tr> </table> <table class="createticketables" > <tr> <td class="indent" id="formfieldpadding">Follow up Date:(MM/DD/YYYY) <input type="text" name="followdate" value="#followup_date#" size="8"/> Current Date<input type="checkbox" name="followcheck" value="" onClick="followdate.value=fill_date()"/></td> <td>On Site:</td> <td> <select name="onsite" id="onsite"> <option value="" selected>No Choice</option> <option value="Yes"<cfif #onsite_flag# is "Y">selected</cfif>>Yes</option> <option value="No"<cfif #onsite_flag# is "N">selected</cfif>>No</option> </select> </td> <td>Number of Onsite:</td> <td> <select name="numonsite"> <option value="" selected>No Choice</option> <cfloop from="0" to="10" index="nonsite"> <option value="#nonsite#"<cfif #number_onsite# is #nonsite#>selected</cfif>>#nonsite# </option></cfloop> </select> </td> </tr> </table> <table class="createticketables" id="space"> <tr> <td class="indent" id="formfieldpadding">Submission: <select class="submissionticketbox" name="submission"> <option value="" selected>Make a Selection</option> <option value="Phone"<cfif #submission# is "Phone">selected</cfif>>Phone</option> <option value="Techmail"<cfif #submission# is "Techmail">selected</cfif>>Techmail</option> <option value="Request"<cfif #submission# is "Request">selected</cfif>>Request</option> </select> </td> </tr> </table>
RachComment
-
I didn't mean that you should remove the whole cfif part, just the cfoutput tags, i.e.
Code:<cfif parts.recordcount is 0> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset submission = ""> <cfinclude template="partsdisplay.cfm"> </cfif>
Comment
-
Originally posted by acoderI didn't mean that you should remove the whole cfif part, just the cfoutput tags, i.e.
Code:<cfif parts.recordcount is 0> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset submission = ""> <cfinclude template="partsdisplay.cfm"> </cfif>
I am confused am i only suppose to have
Code:<cfif parts.recordcount is 0> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset submission = ""> <cfinclude template="partsdisplay.cfm"> </cfif>
Code:<cfoutput query="parts"> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset submission = #submission#> </cfoutput> <cfinclude template="partsdisplay.cfm">
if i looked at a record with values the table don't appear.
Thank you,
RachComment
-
Actually a combination of the two rather similar to serials:
Code:<cfoutput query="parts"> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset submission = #submission#> <cfinclude template="partsdisplay.cfm"> </cfoutput> <cfif parts.recordcount is 0> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset submission = ""> <cfinclude template="partsdisplay.cfm"> </cfif>
Comment
-
Hey Acoder,
it looks like its "almost" there. It shows the table it gives the correct value for most of the fields except 3 of them. the 3 fields are
#hc_partNo#
#followup_date#
#number_onsite#
but i got no clue what is causing it the names match up unless i somehow did it wrong in the partsdisplay.cf m
heres everything in the main page
Code:<cfoutput query="ticket"> <cfset followup_date = #followup_date#> <cfset onsite_flag = #onsite_flag#> <cfset number_onsite = #number_onsite#> </cfoutput> <cfoutput query="parts"> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset submission = #submission#> <cfinclude template="partsdisplay.cfm"> </cfoutput> <cfif parts.recordcount is 0> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset submission = ""> <cfinclude template="partsdisplay.cfm"> </cfif>
Code:<td class="indent" id="formfieldpadding">HC P/N: <input type="text" name="hcpn" style="margin:0px" value="#hc_partNo#"></td> <td class="indent" id="formfieldpadding">Follow up Date:(MM/DD/YYYY) <input type="text" name="followdate" value="#followup_date#" size="8"/> Current Date<input type="checkbox" name="followcheck" value="" onClick="followdate.value=fill_date()"/></td> <td>Number of Onsite:</td> <td> <select name="numonsite"> <option value="" selected>No Choice</option> <cfloop from="0" to="10" index="nonsite"> <option value="#nonsite#"<cfif #number_onsite# is #nonsite#>selected</cfif>>#nonsite# </option></cfloop> </select> </td>
RachComment
-
I think you will need the <cfoutput> tags around those variables, but then that wouldn't work for the first part, so try this:
Code:<cfoutput query="parts"> <cfset hc_partNo = #hc_partNo#> <cfset part_returned = #part_returned#> <cfset defective = #defective#> <cfset submission = #submission#> <cfinclude template="partsdisplay.cfm"> </cfoutput> <cfif parts.recordcount is 0> <cfset hc_partNo = ""> <cfset part_returned = ""> <cfset defective = ""> <cfset submission = ""> <cfoutput><cfinclude template="partsdisplay.cfm"></cfoutput> </cfif>
Comment
-
Hey Acoder,
Well tried that an it didn't work. But i did figure it out. In the partsdisplay.cf m i wrapped it all in just a simple <cfoutput> </cfoutput> and used the code you had in your last post on my main page an now its working :)
Thank you,
RachComment
-
Great to see that you finally managed the parts problem. I think it could be improved further in terms of efficiency/performance if you avoid using cfoutput around the whole file and use it only where you have Coldfusion variables output.Comment
-
-
-
Originally posted by acoderSince this is a new problem that's not going to be solved in one or two posts, I've split off and created a new thread for the new question here. Continue the discussion there. Any improvements to the serials/parts display can, of course, continue here.
I actually have another question concerning parts. The way the information goes into onsite_flag field in the database it appears as a Y or N and i was wondering how could i make it appear to the user as Yes or No.I tried to do it similar to the
checkbox where you would do this
Code:<cfif #defective# eq 1> Yes <cfelse> No </cfif>
Thank you,
RachComment
-
Originally posted by bonneylakeHey Acoder,
I actually have another question concerning parts. The way the information goes into onsite_flag field in the database it appears as a Y or N and i was wondering how could i make it appear to the user as Yes or No.I tried to do it similar to the
checkbox where you would do this
Code:<cfif #defective# eq 1> Yes <cfelse> No </cfif>
Thank you,
Rach
I figured it out. Not sure what i was doing wrong. but in case anyone wanted to know here is what i did
Code:<cfif #onsite_flag# eq "Y"> Yes <cfelse> No </cfif>
to display the date but when it displays it does this 2008-09-23 00:00:00
an would like to get rid of the zeros on the end and was just wondering how i could make it so it only display the 2008-09-23?
Thank you again for all the help,
RachComment
-
Originally posted by acoderUse the DateFormat function with the appropriate mask.
Bit confused on what you mean.This is how i had done it for a previous form
Code:#DateFormat(now(),'mmm dd yyyy')#
Thank you,
RachComment
Comment