1 Reply Latest reply on Sep 21, 2011 8:22 AM by philmodjunk

    if() function error



      if() function error


       Dear Forum,

      I am a novice to FM (using v.11) I am just running through examples in "The Missing Manual" guide and trying to replicate an if function. It seems very obvious and logical but I keep facing an error in the "Specify Calculation" window, see below. I can only ever place the test condition. What am I doing wrong?

      Thanks for your time.



        • 1. Re: if() function error

          What you have here is an IF script step. This is not an If function. You are trying to apply the syntax for a calcualtion using the If function to an IF script step and this won't work.

          In an IF script step, you do not return different values if the expression evaluates as true or false like you do for an If function. Instead, it controls which block of script steps will execute depending on whether the calculation evaluates as true or false.

          If [IMarEST test db::Subject = "dominique" ]

             #Put script steps to be executed if Subject is dominique here


             #Put script steps to be executed if Subject is NOT dominique here

          End IF