1 Reply Latest reply on Feb 29, 2012 7:22 AM by philmodjunk

    Stupid problem

    WilliamBartels

      Title

      Stupid problem

      Post

       What is wrong with the following code?  According to the way I read the HELP descriptions, this should be legal.

       

      IF [DATABASE::FIELD = "M"]

      LET ($$MISSING = $$MISSING + 1)

      ELSE IF [DATABASE::FIELD = "F"]

      LET ($$FILE = $$fILE + 1)

      ELSE

      LET ($$INVALID = $$INVALID + 1)

      END IF

        • 1. Re: Stupid problem
          philmodjunk

          The let function is not a script step. It is a function that can be used in a calculation.

          Use:

          Set Variable [$$Missing ; Value: $$Missing + 1]

           

          If you wanted to use let to assign a value to a variable, you would do something like:

          Set variable [$dummy ; value: Let ($$Missing = $$Missing + 1 ; 1 ) ]

          This assigns 1 to $dummy and $$Missing is incremented as a "side effect" of the calculation's evaluation.