Names Default To Here(1);
dt = Open("$DOWNLOADS/Test (1).jmp");
// get duration columns
dur_cols = Filter Each({col_name}, dt << Get Column Names("String", Continuous),
Starts With(col_name, "durée")
);
// for indexing later
num_colnr = Transform Each({col_name}, dur_cols, Word(-1, col_name));
dt << New Column("DUREE TOT", Numeric, Continuous, << Set Each Value(
colidx = Loc(dt[Row(), num_colnr] > :"opé"n);
If(N Items(colidx) > 0,
val = Sum(dt[Row(), dur_cols[colidx]]);
If(IsMissing(val),
0
,
val
);
,
0
)
));
Data table subscripting
-Jarmo