4 Replies Latest reply on Jan 8, 2013 12:29 PM by carolchansen

    Max Calc Field



      Max Calc Field


             How would I set up a field that does not calculate over 100%

           I have a field that calculates the percentage someone has worked.

           However, we want it to max at 100% rather than continuing to calculate

           Even if someone has worked over 100%.

           Thanks, Carol

        • 1. Re: Max Calc Field

               Use the Min function. Assuming that your percentage calculation returns a decimal where 1 is shown as 100% with data formatting:

               Min ( 1 ; //Put Your Calculation here )

          • 2. Re: Max Calc Field


                 Yea, that worked great – thanks.

                 Now it turns out I have an additional part of the puzzle.

                 I set the field as:

                 Min ( Vacation Options; Vaction Hours Paid Out )

                 That works fine showing the hours paid out maxing out to the vacation options;

                 unless 0 hours were paid out, it shows the full amount of the vacation options instead 0.

            • 3. Re: Max Calc Field

                   Is that value 0 or Empty (Null) ?

                   Make sure that Vacation Hours Paid Out has at least the value of zero and this should not happen. YOu may need to clear the "do not evaluate if all referenced fields are empty" setting on Vacation Hours Paid Out if this is a calculation field.

              • 4. Re: Max Calc Field

                     My applogies

                     I had an error in the script - All is good.

                     Thanks for your help with the "Min" guidance