2 Replies Latest reply on May 22, 2013 3:38 PM by Kirk_1

    Formula 2nd try

    Kirk_1

      Title

      Formula 2nd try

      Post

           This formula evaluates correctly.

           If i swithch and put: //Round... the second one evaluates correctly.

           If I put the or in and put them together by removing the // (with the vendor_do_not_pay =1)...

           it evaluates to 1.   Why?

            

           Round ( ((IN_LineItemPayableTotal / IN_LineItemInvoiceTotal) / -.01)+100;2)

           //or If ( ${Vendor do not pay}::VN_Donotpay  = 1; "0")

        • 1. Re: Formula 2nd try
          philmodjunk

               Or is a logical operator. If either the expression preceding it or the expression following it is true ( a numeric value other than zero evaluates as "true"), then the entire expression is True. Thus, the value 1 is returned by your calculation when you remove the comment slashes (//)

               Use a Case or If function such as:

               IF ( Vendor do not pay::VN_Donotpay ; 0 ; Round ( ((IN_LineItemPayableTotal / IN_LineItemInvoiceTotal) / -.01)+100;2) )

               But keep in mind that I am guessing as to what the expected results of this expression should be.

          • 2. Re: Formula 2nd try
            Kirk_1

                 That worked

                  

                 Thank you