In the following JSL, I want to delete columns using a List method. However, when selecting multiple options, only the first selected item is deleted. This is because Column() cannot handle the conversion of multiple column names selected.
Is there a more straightforward way to achieve the deletion of multiple items besides using a For loop to delete each column one by one?
dt = Open( "$SAMPLE_DATA/Employee Master.jmp" );
col_list = dt << get column names( string );
New Window( "Delete exist Column",
H List Box(
columnList = List Box( col_list ),
Button Box( "Delete Column",
dt << delete column( Column( dt, columnList << GetSelected ) );
columnList << Remove Selected( columnList << GetSelected );
)
)
);