Solved

Cfoutput placement fustration.

Posted on 2006-06-21
14
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
14 Comments
 
LVL 7

Expert Comment

by:aseusainc
ID: 16956029
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
ID: 16959993
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
ID: 16960060
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
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 
LVL 7

Expert Comment

by:aseusainc
ID: 16960238
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
ID: 16960414
Nope, that doesn't work either.
0
 
LVL 7

Expert Comment

by:aseusainc
ID: 16960479
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
ID: 16961352
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
 
LVL 7

Expert Comment

by:aseusainc
ID: 16961400
Just for laughs, lets change

<cfset source = "#selectSource#">

to

<cfset source = "ALL">

and see if we get an error.
0
 

Author Comment

by:DancingFighterG
ID: 16961505
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
ID: 16961552
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
ID: 16961745
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
ID: 16961776
The problem is, you are using the variable above where it is defined.
0
 
LVL 7

Accepted Solution

by:
aseusainc earned 35 total points
ID: 16961819
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
ID: 16962510
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

Business Impact of IT Communications

What are the business impacts of how well businesses communicate during an IT incident? Targeting, speed, and transparency all matter. Find out more in this infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

729 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