4 Replies Latest reply on Apr 27, 2016 9:43 AM by siplus

    Value Name = Amount

    847Electric

      I have a drop down with say 4 values.

       

      Bond Amount (Select)

      $5,000

      $10,000

      $20,000

      $25,000

       

      I want to tell the calculation that if someone selects

      say $5,000 Bond amount it cost us $30 So use $30 when you total up

      the cost for instance....

      $5,000 = $30

      $10,000 = $50

      $20,000 = $100

      $25,000 = $150

       

      How do I do this?

        • 1. Re: Value Name = Amount
          schamblee

          You have a BondAmount field.  Then you would have a BondCost Calculation field with the following calculation :

           

          Case(BondAmount=5000;30;BondAmount=10000;50;BondAmount=20000;100;BondAmount=25000;150)

           

          Then click storage option and select do not store recalculate as needed

          • 2. Re: Value Name = Amount
            user19752

            Use Case() function.

             

            Or magic calculation

            Bond Amount * ( ( Bond Amount - 15e3 ) ^2 + 35e7 ) / 75e9

             

            I'm sad that only one even number is there.

            • 3. Re: Value Name = Amount
              databuzz

              There's a number of ways to do this but here's a quick calculation that uses the Case function that should get you started:

               

              Case (

                BondAmount = "$5,000" ; 30 ;

                BondAmount = "$10,000" ; 50 ;

                BondAmount = "$20,000" ; 100 ;

                BondAmount = "$25,000" ; 150

              ) // Case

               

              Create a new calculation field with this formula, numeric result and it should update when you change the Bond Amount.

              • 4. Re: Value Name = Amount
                siplus

                Create a reference table, with 3 fields:

                 

                BondAmountMin ,      BondAmountMax,           Cost

                 

                              0                                   5000                    30

                          5001                         10000                         50

                 

                 

                and so on.

                 

                Get the cost as reference value as a lookup via a relationship.

                 

                This way you can fine tune your bond costs and no formula is needed