Using ISNULL in if statements

Support

I am trying to use an If statement to test the values in fields and execute a macro if the values are NULL or empty.

 

NB: The database values default to NULL

My code is:

IF (ISNULL($[$BOYX_1.0.0],'') = '')
BEGIN
UF(WEB - ITEMERROR)
END

 

But it will not execute in the Macro.

The error from Debug is :

11:08:20  Could not compile the macro, please check your macro for errors
11:08:20  Line 0 : Error: Expected ) found ,

 

This runs fine in SQL, so I can't work out what is wrong?

Comments

2 comments

  • Comment author
    Bruno CHARNAL
    • Edited

    Hi,

     

    You may be missing a semi column at the end of UF function

    UF(WEB - ITEMERROR);

     

    0
  • Comment author
    Nadav Caridi

    Hi, 

    Try to set a @store value using sql instead and then check against it . 

    use the SQL() syntax

    0

Please sign in to leave a comment.