Solved

Cfoutput placement fustration.

Posted on 2006-06-21
14
384 Views
Last Modified: 2013-12-24
Hello, I'm very fustrated right now with getting things to print out to the screen. I have this code that works fine but because I don't have the cfoutput tags in the right spot it's giving me the following error;

source = #selectSource
Could not get the parameter value due to:

mispelling OR the query attribute is not defined right. Can someone tell me in my code where to properly put these tags because obvioulsy I don't know well enough. Here is the code.

<!--- Secure this page!       --->
<!--- Ensure that you list the correct url of this page in the "This Page" variable. --->
      <cfset ThisPage = "/markwest/accounting_finance/FinAcctng/dsp_APPostingSummary.cfm">
      <cfinclude template="/markwest/blocks/SecurePage.cfm">
<!--- End Secure this page! --->

<cf_header title="Epicor A/P Posting Summary" showDateJS="yes">
<cfinclude template="/markwest/blocks/dsp_Page_Navigation.cfm">

<cfif not isdefined("url.source")>
      <cfset url.source = "All">
</cfif>

<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = '#selectSource#'>

<cfquery name="qry_APcompanies" datasource="core">
select company_name, db_name
from pltmaster..smcomp
where company_id in (select company_id from pltmaster..smperm where app_id = 4000)
and company_id not in (6,16)
order by 1
</cfquery>

<h2>Epicor A/P Posting Summary</h2>
<form name="FormMain" action=#thisPage# method="post">
<h3>A/P Records to Post</h3>
<cfoutput>
<table width="850" border="0">
      <tr>
            <td>
                  <select name="selectSource" onchange="document.searchform.submit();">
                  <cfif #source# eq "All">
                        <option value="All" selected>All
                  <cfelse>
                        <option value="All" >All
                  </cfif>
                  <cfif #source# eq "Right Angle">
                        <option value="Right Angle" selected>Right Angle
                  <cfelse>
                        <option value="Right Angle">Right Angle
                  </cfif>

                  <cfif #source# eq "Expense Reporting">
                        <option value="Expense Reporting" selected>Expense Reporting
                  <cfelse>
                        <option value="Expense Reporting">Expense Reporting
                  </cfif>

                  </select>
            </td>
      </tr>
      <tr><tr><td><input type="Submit" name="makeReport" value="Make Report"</tr></tr></td>
      <tr>
            <td width="200"><b>Company</b></td>
            <td width="100"><b>Source System</b></td>
            <td width="50"><b>Trans. Ctrl Num</b></td>
            <td width="75"><b>Doc. Ctrl Num</b></td>
            <td width="75"><b>Trans Type</b></td>
            <td width="50"><b>Amount</b></td>
            <td width="125"><b>Vendor</b></td>
            <td width="25"><b>Hold Flag</b></td>
            <td width="50"><b>Transfer Date</b></td>
      </tr>

<cfloop query="qry_APcompanies">
            <cfquery name="qry_APToPost" datasource="core">
                  <cfif '#selectSource#' eq "Right Angle">
                        select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_desc, i.amt_gross, m.mw_processed_date, i.hold_flag
                        from #qry_APcompanies.db_name#..apinpchg i, #qry_APcompanies.db_name#..mw_apinpchg m, #qry_APcompanies.db_name#..aptrxtyp t, #qry_APcompanies.db_name#..apmaster a
                        where i.trx_ctrl_num = m.trx_ctrl_num
                        and i.trx_type = t.trx_type
                        and i.vendor_code = a.vendor_code
                        and a.address_type = 0
                        and mw_source_system = '#selectSource#'
                        order by 2
                  <cfelseif '#selectSource#'eq "Expense Reporting">
                        select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_desc, i.amt_gross, m.mw_processed_date, i.hold_flag
                        from #qry_APcompanies.db_name#..apinpchg i, #qry_APcompanies.db_name#..mw_apinpchg m, #qry_APcompanies.db_name#..aptrxtyp t, #qry_APcompanies.db_name#..apmaster a
                        where i.trx_ctrl_num = m.trx_ctrl_num
                        and i.trx_type = t.trx_type
                        and i.vendor_code = a.vendor_code
                        and a.address_type = 0
                        and mw_source_system = '#selectSource#'
                        order by 2
                  <cfelse>
                        select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_desc, i.amt_gross, m.mw_processed_date, i.hold_flag
                        from #qry_APcompanies.db_name#..apinpchg i, #qry_APcompanies.db_name#..mw_apinpchg m, #qry_APcompanies.db_name#..aptrxtyp t, #qry_APcompanies.db_name#..apmaster a
                        where i.trx_ctrl_num = m.trx_ctrl_num
                        and i.trx_type = t.trx_type
                        and i.vendor_code = a.vendor_code
                        and a.address_type = 0
                  </cfif>
            </cfquery>

            <cfset coname = #qry_APcompanies.company_name#>

<cfloop query="qry_APToPost">
            <cfif #batch_count# eq "0">
                  <cfset last_company = #coname#>
                  <cfset last_type = #qry_APToPost.trx_type_desc#>
                  <cfset last_source = #mw_source_system#>
            </cfif>
            <cfif #last_company# neq #coname# or #last_type# neq #trx_type_desc# or #last_source# neq #mw_source_system#>
            <tr>
                  <td><strong>Total</strong></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td><strong>#batch_count# #last_type#(s)</strong></td>
                  <td><strong>#DollarFormat(batch_amount)#</strong></td>
                  <td></td>
                  <td></td>
                  <td></td>
            </tr>

                  <cfset batch_amount = 0>
                  <cfset batch_count = 0>
                  <cfset last_company = #coname#>
                  <cfset last_source = #mw_source_system#>
            </cfif>

            <tr>
                  <td>#coname#</td>
                  <td>#mw_source_system#</td>
                  <td>#trx_ctrl_num#</td>
                  <td>#doc_ctrl_num#</td>
                  <td>#trx_type_desc#</td>
                  <td>#DollarFormat(amt_gross)#</td>
                  <td>#address_name#</td>
                  <td>#hold_flag#</td>
                  <td>#dateformat(mw_processed_date, "mm/dd/yy")#</td>
            </tr>
                  <cfset batch_amount = #batch_amount# + #amt_gross#>
                  <cfset batch_count = #batch_count# + 1>
</cfloop>

                              
                  <tr>
                        <td><strong>Total</strong></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td><strong>#batch_count# #last_type#(s)</strong></td>
                        <td><strong>#DollarFormat(batch_amount)#</strong></td>
                        <td></td>
                        <td></td>
                        <td></td>
                  </tr>


</table>

<!---Cool---->

<h3>A/P Transfer Problems</h3>

<table width="800">
      <tr>
            <td width="250"><b>Company</b></td>
            <td width="150"><b>Source System</b></td>
            <td width="50"><b>Doc. Ctrl Num</b></td>
            <td width="50"><b>Amount</b></td>
            <td width="50"><b>Vendor Code</b></td>
            <td width="250"><b>Transfer Error</b></td>
      </tr>

<cfloop query="qry_APcompanies">
      <cfquery name="qry_APTransferErrors" datasource="core">
            select distinct doc_ctrl_num, convert( varchar, dateadd(dd,(date_doc-693596),'1900/01/01'), 101 ) as 'date_doc', trx_type, apply_to_num, <!---apply_trx_type, --->convert(numeric(10,2), amt_gross) amt_gross, vendor_code, pay_to_addr1, mw_source_system, tiSeverity, vcMessage, vcSource
            from #qry_APcompanies.db_name#..mw_apinpchg chg, #qry_APcompanies.db_name#..mw_errors e
            where chg.trx_ctrl_num = e.vcTrxCtrlNum
            and doc_ctrl_num not in (select doc_ctrl_num from #qry_APcompanies.db_name#..apinpchg union select doc_ctrl_num from #qry_APcompanies.db_name#..apvohdr)
            and mw_processed_date is null
            and amt_gross <> 0
            order by 1
      </cfquery>
                        
      <cfset coname = #qry_APcompanies.company_name#>

            <cfloop query="qry_APTransferErrors">
                        <cfoutput query="qry_APTransferErrors">
                        <tr>
                              <td>#coname#</td>
                              <td>#mw_source_system#</td>
                              <td><a href="dsp_APTransferDetails.cfm?system=#mw_source_system#&doc_num=#doc_ctrl_num#">#doc_ctrl_num#</a></td>
                              <td>#DollarFormat(amt_gross)#</td>
                              <td>#vendor_code#</td>
                              <td>#vcMessage#</td>
                        </tr>
                        </cfoutput>
            </cfloop>

</cfloop>

</table>

<!---Cool---->
<h3>A/P Source System to Epicor Reconciliation</h3>

<cfquery name="qry_sourceMissing" datasource="core">

select 'Right Angle' as source_system, InvoiceNumber as invoice_number,
(select BANme from [mwdevsv14\RightAngle].RightAngleTest.dbo.BusinessAssociate where BAID = InternalBAID) as internal_company,
(select BANme from [mwdevsv14\RightAngle].RightAngleTest.dbo.BusinessAssociate where BAID = ExternalBAID) as customer_company,
InvoiceDate as statement_date, InvoiceAmount as total_value, FedDate as fed_date
from [mwdevsv14\RightAngle].RightAngleTest.dbo.PayableHeader SIH
where InvoiceAmount <> 0
and InvoiceDate > '1/1/05'
and InternalBAID not in (631, 607, 375, 401) -- these are the SWBU companies that don't end up in RA
and Matched = 'Y'
and status <> 'H'
and Status <> 'P'
<!--- and PybleHdrTmplteID <> 901 --->
and InvoiceNumber not in
(select doc_ctrl_num from MWHydrocarbon..aptrxage
union select doc_ctrl_num from MWHydrocarbon..mw_apinpchg
union select doc_ctrl_num from MWEnergyAppal..mw_apinpchg
union select doc_ctrl_num from MWMichigan..mw_apinpchg
union select doc_ctrl_num from MLPWestShore..mw_apinpchg
union select doc_ctrl_num from Matrex..mw_apinpchg)
order by 1, InvoiceDate, InvoiceNumber

</cfquery>
<table width="800">
      <tr>
            <td width="100"><b>Source System</b></td>
            <td width="120"><b>Company</b></td>
            <td width="50"><b>Vendor</b></td>
            <td width="50"><b>Doc. Ctrl Num</b></td>
            <td width="50"><b>Amount</b></td>
            <td width="50"><b>Statement Date</b></td>
      </tr>

            <cfoutput query="qry_sourceMissing">
                        <tr>
                              <td>#source_system#</td>
                              <td>#internal_company#</td>
                              <td>#customer_company#</td>
                              <td>#invoice_number#</td>
                              <td>#DollarFormat(total_value)#</td>
                              <td>#dateformat(statement_date, "mm/dd/yy")#</td>
                        </tr>
            </cfoutput>
</table>

</form>
<cf_footer>

I've taken out every cfoutput with the exception of two. Please help get this is easy problem fix.
0
Comment
Question by:DancingFighterG
  • 7
  • 7
14 Comments
 
LVL 7

Expert Comment

by:aseusainc
Comment Utility
What line number does it throw the error on?

Not positive, but <cfelseif '#selectSource#'eq "Expense Reporting"> might supposed to have a space in it like so:
<cfelseif '#selectSource#' eq "Expense Reporting">
0
 

Author Comment

by:DancingFighterG
Comment Utility
It throws the error at this line:

<cfset source = '#selectSource#'>

The error is:

source = #selectSource
Could not get the parameter value due to:

mispelling OR the query attribute is not defined right.

It something to do with the cfoutput in the file so I took almost all them out so someone could tell me where I should put them properly.
0
 

Author Comment

by:DancingFighterG
Comment Utility
Here is my code with the cfoutputs in it:

<!--- Secure this page!       --->
<!--- Ensure that you list the correct url of this page in the "This Page" variable. --->
      <cfset ThisPage = "/markwest/accounting_finance/FinAcctng/dsp_APPostingSummary.cfm">
      <cfinclude template="/markwest/blocks/SecurePage.cfm">
<!--- End Secure this page! --->

<cf_header title="Epicor A/P Posting Summary" showDateJS="yes">
<cfinclude template="/markwest/blocks/dsp_Page_Navigation.cfm">

<cfif not isdefined("url.source")>
      <cfset url.source = "All">
</cfif>

<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = "#selectSource#">

<cfquery name="qry_APcompanies" datasource="core">
select company_name, db_name
from pltmaster..smcomp
where company_id in (select company_id from pltmaster..smperm where app_id = 4000)
and company_id not in (6,16)
order by 1
</cfquery>

<h2>Epicor A/P Posting Summary</h2>
<form name="FormMain" action=#thisPage# method="post">
<h3>A/P Records to Post</h3>
<table width="850" border="0">
      <tr>
            <td>
                  <select name="selectSource" onchange="document.searchform.submit();">
                  <cfif #source# eq "All">
                        <option value="All" selected>All
                  <cfelse>
                        <option value="All" >All
                  </cfif>
                  <cfif #source# eq "Right Angle">
                        <option value="Right Angle" selected>Right Angle
                  <cfelse>
                        <option value="Right Angle">Right Angle
                  </cfif>

                  <cfif #source# eq "Expense Reporting">
                        <option value="Expense Reporting" selected>Expense Reporting
                  <cfelse>
                        <option value="Expense Reporting">Expense Reporting
                  </cfif>

                  </select>
            </td>
      </tr>
      <tr><tr><td><input type="Submit" name="makeReport" value="Make Report"</tr></tr></td>
      <tr>
            <td width="200"><b>Company</b></td>
            <td width="100"><b>Source System</b></td>
            <td width="50"><b>Trans. Ctrl Num</b></td>
            <td width="75"><b>Doc. Ctrl Num</b></td>
            <td width="75"><b>Trans Type</b></td>
            <td width="50"><b>Amount</b></td>
            <td width="125"><b>Vendor</b></td>
            <td width="25"><b>Hold Flag</b></td>
            <td width="50"><b>Transfer Date</b></td>
      </tr>

<cfloop query="qry_APcompanies">
            <cfquery name="qry_APToPost" datasource="core">
                  <cfif '#selectSource#' eq "Right Angle">
                        select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_desc, i.amt_gross, m.mw_processed_date, i.hold_flag
                        from #qry_APcompanies.db_name#..apinpchg i, #qry_APcompanies.db_name#..mw_apinpchg m, #qry_APcompanies.db_name#..aptrxtyp t, #qry_APcompanies.db_name#..apmaster a
                        where i.trx_ctrl_num = m.trx_ctrl_num
                        and i.trx_type = t.trx_type
                        and i.vendor_code = a.vendor_code
                        and a.address_type = 0
                        and mw_source_system = '#selectSource#'
                        order by 2
                  <cfelseif '#selectSource#' eq "Expense Reporting">
                        select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_desc, i.amt_gross, m.mw_processed_date, i.hold_flag
                        from #qry_APcompanies.db_name#..apinpchg i, #qry_APcompanies.db_name#..mw_apinpchg m, #qry_APcompanies.db_name#..aptrxtyp t, #qry_APcompanies.db_name#..apmaster a
                        where i.trx_ctrl_num = m.trx_ctrl_num
                        and i.trx_type = t.trx_type
                        and i.vendor_code = a.vendor_code
                        and a.address_type = 0
                        and mw_source_system = '#selectSource#'
                        order by 2
                  <cfelse>
                        select isNull(m.mw_source_system, 'Epicor') as mw_source_system, i.trx_ctrl_num, i.doc_ctrl_num, i.vendor_code, a.address_name,t.trx_type_desc, i.amt_gross, m.mw_processed_date, i.hold_flag
                        from #qry_APcompanies.db_name#..apinpchg i, #qry_APcompanies.db_name#..mw_apinpchg m, #qry_APcompanies.db_name#..aptrxtyp t, #qry_APcompanies.db_name#..apmaster a
                        where i.trx_ctrl_num = m.trx_ctrl_num
                        and i.trx_type = t.trx_type
                        and i.vendor_code = a.vendor_code
                        and a.address_type = 0
                  </cfif>
            </cfquery>

            <cfset coname = #qry_APcompanies.company_name#>

            <cfloop query="qry_APToPost">
            
                        <cfif #batch_count# eq "0">
                        <cfset last_company = #coname#>
                        <cfset last_type = #qry_APToPost.trx_type_desc#>
                        <cfset last_source = #mw_source_system#>
                  </cfif>
                  
                  <cfif #last_company# neq #coname# or #last_type# neq #trx_type_desc# or #last_source# neq #mw_source_system#>
                  <cfoutput query = "qry_APtoPost">
                  <tr>
                        <td><strong>Total</strong></td>
                        <td></td>
                        <td></td>
                        <td></td>
                        <td><strong>#batch_count# #last_type#(s)</strong></td>
                        <td><strong>#DollarFormat(batch_amount)#</strong></td>
                        <td></td>
                        <td></td>
                        <td></td>
                  </tr>
                  </cfoutput>
                        <cfset batch_amount = 0>
                        <cfset batch_count = 0>
                        <cfset last_company = #coname#>
                        <cfset last_source = #mw_source_system#>
                  </cfif>
                  <cfoutput query = "qry_APtoPost">
                  <tr>
                        <td>#coname#</td>
                        <td>#mw_source_system#</td>
                        <td>#trx_ctrl_num#</td>
                        <td>#doc_ctrl_num#</td>
                        <td>#trx_type_desc#</td>
                        <td>#DollarFormat(amt_gross)#</td>
                        <td>#address_name#</td>
                        <td>#hold_flag#</td>
                        <td>#dateformat(mw_processed_date, "mm/dd/yy")#</td>
                  </tr>
                  </cfoutput>
                  
                        <cfset batch_amount = #batch_amount# + #amt_gross#>
                        <cfset batch_count = #batch_count# + 1>
            </cfloop>

                        <cfoutput query="qry_APToPost">
                        <tr>
                              <td><strong>Total</strong></td>
                              <td></td>
                              <td></td>
                              <td></td>
                              <td><strong>#batch_count# #last_type#(s)</strong></td>
                              <td><strong>#DollarFormat(batch_amount)#</strong></td>
                              <td></td>
                              <td></td>
                              <td></td>
                        </tr>
                        </cfoutput>
</cfloop>                              
</table>

<!---Cool---->

<h3>A/P Transfer Problems</h3>

<table width="800">
      <tr>
            <td width="250"><b>Company</b></td>
            <td width="150"><b>Source System</b></td>
            <td width="50"><b>Doc. Ctrl Num</b></td>
            <td width="50"><b>Amount</b></td>
            <td width="50"><b>Vendor Code</b></td>
            <td width="250"><b>Transfer Error</b></td>
      </tr>

<cfloop query="qry_APcompanies">
      <cfquery name="qry_APTransferErrors" datasource="core">
            select distinct doc_ctrl_num, convert( varchar, dateadd(dd,(date_doc-693596),'1900/01/01'), 101 ) as 'date_doc', trx_type, apply_to_num, <!---apply_trx_type, --->convert(numeric(10,2), amt_gross) amt_gross, vendor_code, pay_to_addr1, mw_source_system, tiSeverity, vcMessage, vcSource
            from #qry_APcompanies.db_name#..mw_apinpchg chg, #qry_APcompanies.db_name#..mw_errors e
            where chg.trx_ctrl_num = e.vcTrxCtrlNum
            and doc_ctrl_num not in (select doc_ctrl_num from #qry_APcompanies.db_name#..apinpchg union select doc_ctrl_num from #qry_APcompanies.db_name#..apvohdr)
            and mw_processed_date is null
            and amt_gross <> 0
            order by 1
      </cfquery>
                        
      <cfset coname = #qry_APcompanies.company_name#>

            <cfloop query="qry_APTransferErrors">
                        <cfoutput query="qry_APTransferErrors">
                        <tr>
                              <td>#coname#</td>
                              <td>#mw_source_system#</td>
                              <td><a href="dsp_APTransferDetails.cfm?system=#mw_source_system#&doc_num=#doc_ctrl_num#">#doc_ctrl_num#</a></td>
                              <td>#DollarFormat(amt_gross)#</td>
                              <td>#vendor_code#</td>
                              <td>#vcMessage#</td>
                        </tr>
                        </cfoutput>
            </cfloop>

</cfloop>
</table>


<!---Cool---->
<h3>A/P Source System to Epicor Reconciliation</h3>

<cfquery name="qry_sourceMissing" datasource="core">
select 'Right Angle' as source_system, InvoiceNumber as invoice_number,
(select BANme from [mwdevsv14\RightAngle].RightAngleTest.dbo.BusinessAssociate where BAID = InternalBAID) as internal_company,
(select BANme from [mwdevsv14\RightAngle].RightAngleTest.dbo.BusinessAssociate where BAID = ExternalBAID) as customer_company,
InvoiceDate as statement_date, InvoiceAmount as total_value, FedDate as fed_date
from [mwdevsv14\RightAngle].RightAngleTest.dbo.PayableHeader SIH
where InvoiceAmount <> 0
and InvoiceDate > '1/1/05'
and InternalBAID not in (631, 607, 375, 401) -- these are the SWBU companies that don't end up in RA
and Matched = 'Y'
and status <> 'H'
and Status <> 'P'
<!--- and PybleHdrTmplteID <> 901 --->
and InvoiceNumber not in
(select doc_ctrl_num from MWHydrocarbon..aptrxage
union select doc_ctrl_num from MWHydrocarbon..mw_apinpchg
union select doc_ctrl_num from MWEnergyAppal..mw_apinpchg
union select doc_ctrl_num from MWMichigan..mw_apinpchg
union select doc_ctrl_num from MLPWestShore..mw_apinpchg
union select doc_ctrl_num from Matrex..mw_apinpchg)
order by 1, InvoiceDate, InvoiceNumber
</cfquery>

<table width="800">
      <tr>
            <td width="100"><b>Source System</b></td>
            <td width="120"><b>Company</b></td>
            <td width="50"><b>Vendor</b></td>
            <td width="50"><b>Doc. Ctrl Num</b></td>
            <td width="50"><b>Amount</b></td>
            <td width="50"><b>Statement Date</b></td>
      </tr>

            <cfoutput query="qry_sourceMissing">
                        <tr>
                              <td>#source_system#</td>
                              <td>#internal_company#</td>
                              <td>#customer_company#</td>
                              <td>#invoice_number#</td>
                              <td>#DollarFormat(total_value)#</td>
                              <td>#dateformat(statement_date, "mm/dd/yy")#</td>
                        </tr>
            </cfoutput>
</table>

</form>
<cf_footer>
0
 
LVL 7

Expert Comment

by:aseusainc
Comment Utility
Assuming selectSource is text, try changing

<cfset source = '#selectSource#'>

to

<cfset source = "#selectSource#">

Generally, single and double quotes are pretty interchangeable in CF, but sometimes CF acts quirky...
0
 

Author Comment

by:DancingFighterG
Comment Utility
Nope, that doesn't work either.
0
 
LVL 7

Expert Comment

by:aseusainc
Comment Utility
Looking a little closer at your code, you have this clump of cfsets:

<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = "#selectSource#">

But nowhere prior is #selectsource# defined.  Where is this value supposed to be coming from?
0
 

Author Comment

by:DancingFighterG
Comment Utility
The selectSource is a value coming from a drop down box. Here is the code for that:

<select name="selectSource" onchange="document.searchform.submit();">
               <cfif #source# eq "All">
                    <option value="All" selected>All
               <cfelse>
                    <option value="All" >All
               </cfif>
               <cfif #source# eq "Right Angle">
                    <option value="Right Angle" selected>Right Angle
               <cfelse>
                    <option value="Right Angle">Right Angle
               </cfif>

               <cfif #source# eq "Expense Reporting">
                    <option value="Expense Reporting" selected>Expense Reporting
               <cfelse>
                    <option value="Expense Reporting">Expense Reporting
               </cfif>

               </select>
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 7

Expert Comment

by:aseusainc
Comment Utility
Just for laughs, lets change

<cfset source = "#selectSource#">

to

<cfset source = "ALL">

and see if we get an error.
0
 

Author Comment

by:DancingFighterG
Comment Utility
Yhea, it start giving me an error on this line:

'#selectSource#' eq "Right Angle"

Error resolving parameter SELECTSOURCE


ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:

You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
0
 
LVL 7

Expert Comment

by:aseusainc
Comment Utility
oops, I did that backwards from the way I MEANT to do it.  Put the last line back and above it, ADD this line:

<cfset selectsource="ALL">

Sorry about that.  Bottom line, I think you may not be passing in a value for that variable from your form...
0
 

Author Comment

by:DancingFighterG
Comment Utility
Same error.

Well, is my form select statement wrong then. It doesn't seem wrong.

<select name="selectSource" onchange="document.searchform.submit();">
               <cfif #source# eq "All">
                    <option value="All" selected>All
               <cfelse>
                    <option value="All" >All
               </cfif>
               <cfif #source# eq "Right Angle">
                    <option value="Right Angle" selected>Right Angle
               <cfelse>
                    <option value="Right Angle">Right Angle
               </cfif>

               <cfif #source# eq "Expense Reporting">
                    <option value="Expense Reporting" selected>Expense Reporting
               <cfelse>
                    <option value="Expense Reporting">Expense Reporting
               </cfif>

               </select>
0
 
LVL 7

Expert Comment

by:aseusainc
Comment Utility
The problem is, you are using the variable above where it is defined.
0
 
LVL 7

Accepted Solution

by:
aseusainc earned 35 total points
Comment Utility
Try addiing this at the top of that cluster of cfset tags like so:


<cfparam name="selectSource" default="ALL">
<cfset batch_amount = 0>
<cfset batch_count = 0>
<cfset last_company = "">
<cfset last_type = "">
<cfset last_source = "">
<cfset source = "#selectSource#">
0
 

Author Comment

by:DancingFighterG
Comment Utility
Cool, thanks man. Now I know what to do. It's weird though because in other CF pages that I have written i didn't have to pass a parameter like that.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now