3 Replies Latest reply on Sep 16, 2015 8:41 AM by lbl159

    Case function not returning data

    lbl159

      Take a look at my case function and let me know if you see something that jumps out at you that's wrong with anything.

       

      It currently is not returning any value for S3_Current Value Per Share.

       

      S3_Current Value Per Share:

       

      Let([

      Last completed series = Case ( not IsEmpty ( S3_Offering Amount 01 ) and IsEmpty ( S3_Offering Amount 02 ) ; S4_Investor_Entities::S4_BVD Sub Series Number = "1" ;

      not IsEmpty ( S3_Offering Amount 02 ) and IsEmpty ( S3_Offering Amount 03 ) ; S4_Investor_Entities::S4_BVD Sub Series Number = "2" ;

      not IsEmpty ( S3_Offering Amount 03 ) and IsEmpty ( S3_Offering Amount 04 ) ; S4_Investor_Entities::S4_BVD Sub Series Number = "3" ;

      not IsEmpty ( S3_Offering Amount 04 ) and IsEmpty ( S3_Offering Amount 05 ) ; S4_Investor_Entities::S4_BVD Sub Series Number = "4" ;

      not IsEmpty ( S3_Offering Amount 05 ) and IsEmpty ( S3_Offering Amount 06 ) ; S4_Investor_Entities::S4_BVD Sub Series Number = "5" ;

      not IsEmpty ( S3_Offering Amount 06 ) and IsEmpty ( S3_Offering Amount 07 ) ; S4_Investor_Entities::S4_BVD Sub Series Number = "6" ;

      not IsEmpty ( S3_Offering Amount 07 ) ; S4_Investor_Entities::S4_BVD Sub Series Number = "7" );

       

       

      result = Case ( Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number = "1" ; (S3_Exit Value Range/S3_PostMoney 01) * S3_Unit_Share Amount 01 ;

      Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number = "2" ; (S3_Exit Value Range/S3_PostMoney 02) * S3_Unit_Share Amount 02 ;

      Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number = "3" ; (S3_Exit Value Range/S3_PostMoney 03) * S3_Unit_Share Amount 03 ;

      Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number = "4" ; (S3_Exit Value Range/S3_PostMoney 04) * S3_Unit_Share Amount 04 ;

      Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number = "5" ; (S3_Exit Value Range/S3_PostMoney 05) * S3_Unit_Share Amount 05 ;

      Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number = "6" ; (S3_Exit Value Range/S3_PostMoney 06) * S3_Unit_Share Amount 06 ;

      Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number = "7" ; (S3_Exit Value Range/S3_PostMoney 07) * S3_Unit_Share Amount 07 )] ; result )

        • 1. Re: Case function not returning data
          lbl159

          I got it.  I just needed to add a set of parentheses around S4_Investor_Entities::S4_BVD Sub Series Number = "1"


          result = Case ( Last completed series = (S4_Investor_Entities::S4_BVD Sub Series Number = "1") ; (S3_Exit Value Range/S3_PostMoney 01) * S3_Unit_Share Amount 01 ;

          • 2. Re: Case function not returning data
            nickorr

            ibl159,

             

            I don't think this is doing what you want it to do.  All of the Case statements in the first example will resolve "Last completed series" to either 1 or 0, because the "result" part of the Case is a comparison :

             

            S4_Investor_Entities::S4_BVD Sub Series Number = "1"

             

            this either has to be true or false, it's a comparison not a set field.  So when you do the second Case statement, you've got two comparisons going on :

             

            Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number = "1"

             

            which you can rewrite as :

             

            ( Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number ) = "1"

             

            So if the first comparison  ( Last completed series = S4_Investor_Entities::S4_BVD Sub Series Number ) is true the second one ( true = "1" ) will work, but the rest of the Case statements compare "true/false" against "2", or "3" etc, which will never resolve to true.

             

            Not sure what you're trying to achieve here, but this doesn't seem to be it.

             

            Cheers,

            Nick

            • 3. Re: Case function not returning data
              lbl159

              Thank you very much.  Gave me enough info to figure it out.