Advertisement

06.02.2008 at 09:59PM PDT, ID: 23452075
[x]
Attachment Details

How to find closest number in a LIST

Asked by Janrow in ColdFusion Application Server, ColdFusion Studio, Cold Fusion Markup Language

Tags: Coldfusion

A sales total is passed to another CFM page via FORM.TOTALSALES.

On that page are six unchanging numbers, 9,18,35,50,75,100. I need know which of these six numbers is closest to FORM.TOTALSALES without exceeding FORM.TOTALSALES. The sales number from the customer can be anywhere between $0.01 (one cent) and $100.00. I cannot ignore the cents so rounding off the sales figure wouldn't be as acceptable. I will want to display the closest TOTALSALES number.

I could use a redundant combination of CFIF and CFELSEIF, etc, but I thought there may be a more elegant way one of you expert master types can point out using coldfusion.  There are no database records to query so what's the best way to do this strictly with coldfusion?Start Free Trial
 
Loading Advertisement...
 
[+][-]06.02.2008 at 10:26PM PDT, ID: 21697759

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.02.2008 at 10:30PM PDT, ID: 21697766

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.02.2008 at 10:40PM PDT, ID: 21697805

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.02.2008 at 10:47PM PDT, ID: 21697828

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.02.2008 at 10:52PM PDT, ID: 21697845

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.02.2008 at 10:54PM PDT, ID: 21697849

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.03.2008 at 01:17AM PDT, ID: 21698381

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: ColdFusion Application Server, ColdFusion Studio, Cold Fusion Markup Language
Tags: Coldfusion
Sign Up Now!
Solution Provided By: Zvonko
Participating Experts: 2
Solution Grade: B
 
 
[+][-]06.03.2008 at 12:20PM PDT, ID: 21703618

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.04.2008 at 07:55PM PDT, ID: 21716044

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06.08.2008 at 10:23PM PDT, ID: 21741120

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.08.2008 at 10:45PM PDT, ID: 21741173

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.08.2008 at 10:56PM PDT, ID: 21741196

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 10:08AM PDT, ID: 21744744

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.09.2008 at 10:00PM PDT, ID: 21748592

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.10.2008 at 12:15AM PDT, ID: 21749063

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.10.2008 at 04:28AM PDT, ID: 21750113

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628