I'm trying to properly format an IF statement and can't get it to work after umpteen iterations. Appreciate any help!
I have a data table with a column called "Process Step Description".....data type character
I have another column in the table called "Module Failures" that is data type numeric/continuous; I create it successfully using the script segment below
I want to set the value of the cell in the "Module Failures" column based upon the value in the "Process Step Description" cell, as follows:
Process Step Description..................Module Failures
Outgoing Quality Check.................... 0
Unit Fails............................................1
I have the following commands in my script; as far as I can tell everything functions properly except for the IF statement itself
dt<<New Column("Module Failures");
column ("Module Failures") << data type(Numeric, Format("Fixed Dec", 1,0));
column ("Module Failures") << Modeling Type(Continuous);
If (Process Step Description == "Unit Fails", ("Module Failures" = 1), ("Module Failures" =0) );
It could be something to do with the quotes as I always get confused by the single and double quote rules but I tried so many permutations and nothing seems to work
Thank you in advance