There are few different options all with their own disadvantages and advantages. Some are slower/faster, some take more code to write,... I usually use Summarize()
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
// Use associative array + get keys (slowest)
uniqnames1 = Associative Array(Column(dt, "name")) << get keys;
// Use summarize (will convert numeric values to characters)
Summarize(dt, uniqnames2 = By(:name));
// Use summary + data table subscripting (or get values)
dt_summary = dt << Summary(
Group(:name),
Freq("None"),
Weight("None"),
Link to original data table(0),
private
);
uniqnames3 = dt_summary[0, "name"];
uniqnames4 = Column(dt_summary, "name") << get values;
Close(dt_summary, no save);
Show(uniqnames1, uniqnames2, uniqnames3, uniqnames4);
-Jarmo