script/formula _add a comment in a new column after a certain dateHello,
I have a table (attached) and created column "condition". I want this column to say "before" or "after" based on the date stated in
varProcessChange. I can't make it work correctly. Can you pleas see what Is missing?
varProcessChange = Date MDY( 09, 1, 2020 );
Eval(
Eval Expr(
colCondition = dt1 << New Column( “Condition”,
character,
nominal,
formula( If( :name( "MonthYear" ) < Expr( varProcessChange ), "Before", "After" ) )
)
)
);
thank you
Data TableRe: script/formula _add a comment in a new column after a certain dateI think this is the best way to handle your issue
Names Default To Here( 1 );
dt1=current data table();
varProcessChange = Date MDY( 09, 1, 2020 );
Eval(
Substitute(
Expr(
colCondition = dt1 << New Column( “Condition”,
character,
nominal,
formula(
If( :name( "MonthYear" ) < __vpc__,
"Before",
"After"
)
)
);
),
Expr( __vpc__ ), varProcessChange
)
);