Hi,
I have written the following piece of code which checks if/not a list contains a character and performs some steps accordingly.
For some reason, the script doesnt check for "if contains" condition and always executes the else part.I think I have a silly mistake here.
Clear Symbols();
Delete Symbols();
clear globals();
dtNext = Open("C:\temp\output.csv","invisible");
Summarize(dtNext, testlist = By(:test));
show(testlist );
SAVEPATH = "C:\temp\";
If(contains(testlist ,"M"),
Macrodt=New Table("test_type",
New Column("test_type",
Character,
Nominal,
Set Values( {"Morning"})
),
invisible
);
, //else
Macrodt=New Table("test_type",
New Column("test_type",
Character,
Nominal,
Set Values( {"Evening"})
),
invisible
);
);
//Save macro file
Macrodt<<Save(SAVEPATH||"test_type.csv");