1 Reply Latest reply on Jul 18, 2014 11:06 AM by philmodjunk

    Can't figure out what's wrong with my basic script

    hanstrager

      Title

      Can't figure out what's wrong with my basic script

      Post

           I have a script that should decide what print layout to go to.

           Just one bit of it does not work and not sure whats wrong with it

           I have the following calculation in an If statement:

           ((TECHNICAL SHEET 2::Picture switch = "1 Pic" and IsEmpty(TECHNICAL SHEET 2::Extra_drawing)) or

           (TECHNICAL SHEET 2::Picture switch = "4 Pics" and IsEmpty(TECHNICAL SHEET 2::Pic1 & TECHNICAL SHEET 2::Pic2 & TECHNICAL SHEET 2::Pic3 & TECHNICAL SHEET 2::Pic4)))

           But it doesn't seem to work and take me to the wrong layout.

            

        • 1. Re: Can't figure out what's wrong with my basic script
          philmodjunk

               I suggest breaking this down into parts and checking to see if each part evaluates as expected. Since you have advanced, you might start by entering this expression as a Watch expression. True results will evaluate as 1. False results will evaluate to 0. You can then test different portions of the expression in the data viewer to narrow things down to just the part that is not evaluating correctly.