Announcement

Collapse
No announcement yet.

IF statement not firing off...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IF statement not firing off...

    I have an IF block, with code in it..
    It's not firing.

    From the log file:

    START: Perform action: IF
    Condition = "New"="New"
    (On Error) User notification mode = None
    (On Error) Action = Continue
    Result = 0
    END: Perform action: END IF

    Nothing in the if/endif block gets executed... it's like "New" <> "New"

    thanks.
    -josh

  • #2
    Re: IF statement not firing off...

    Given the log that you have provided, I assume that you have a variable that contains the value "New" including the quotes.

    In your condition you have that variable, let's call it %CustomVar% and compare it to "New". However quotes in that condition only acts as a container for the string new. Therefore if you need quotes in the string you are comparing the variable to, you will need to escape them. For example:

    "\"New\""

    This is just a theory, however I believe that is what is happening.

    Comment


    • #3
      Re: IF statement not firing off...

      ok; I guess that leads to a question.

      When (if at all) are quotes required and not reqiured?

      Comment


      • #4
        Re: IF statement not firing off...

        If the strings don't contain any spaces or other value-delimiting characters such as + - * / = > < ( ), the quotation marks can be omitted. Otherwise you will need to quote values in expressions.

        Contents of variables do not need to be quoted unless you want quotes in their value. You also do not need to quote variables in expressions.

        Hope that clears things up.

        Comment

        Working...
        X
        😀
        🥰
        🤢
        😎
        😡
        👍
        👎