Hi.
I would like to get the col name of the last data written using JSL,
Is there a solution?
Thanks.
There is a solution (or many of them). Are all of your columns numeric or can there be character columns?
Edit:
Here is one option assuming there can be character columns
Names Default To Here(1); dt = New Table("Untitled", Add Rows(3), Compress File When Saved(1), New Column("Column 1", Numeric, "Continuous", Format("Best", 12), Set Values([1, ., 1])), New Column("Column 2", Numeric, "Continuous", Format("Best", 12), Set Values([., 2, 2])), New Column("Column 3", Numeric, "Continuous", Format("Best", 12), Set Values([., ., .])), New Column("Column 4", Numeric, "Continuous", Format("Best", 12), Set Values([., ., 3])), New Column("Column 5", Character, Nominal, Format("Best", 12), Set Values({"a", "", ""})) ); newcol = dt << New Column("lastdata", Character, Nominal); collist = dt << Get Column Names("String"); For Each Row(dt, m = Loc(Matrix(!IsMissing(dt[Row(), collist]))); lastdata = Max(m); newcol[Row()] = collist[lastdata]; );