Here is a script that will reorder the columns as you requested
Names Default To Here( 1 );
// Example table to use for illustration
New Table( "Example",
Add Rows( 0 ),
New Column( "Department", Character, "Nominal" ),
New Column( "Resource", Character, "Nominal" ),
New Column( "Chart", Character, "Nominal", Set Selected ),
New Column( "17/10/2024", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "16/10/2024", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "15/10/2024", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "11/10/2024", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "14/10/2024", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "18/10/2024", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "13/10/2024", Numeric, "Continuous", Format( "Best", 12 ) ),
New Column( "12/10/2024", Numeric, "Continuous", Format( "Best", 12 ) )
);
Wait( 5 );
// This JSL with properly reorder the data table
dt = Current Data Table();
colNames = dt << get column names( string );
For Each( {col}, colNames,
If( Is Missing( Try( Num( Informat( col, "d/m/y" ) ) ) ) == 0,
Column( dt, col ) << set name( Char( Num( Informat( col, "d/m/y" ) ) ) ),
Column( dt, col ) << set name( "0" || col )
)
);
// Reorder columns by name
dt << Reorder by Name;
colNames = dt << get column names( string );
For Each( {col}, colNames,
If( Is Missing( Num( col ) ) == 0,
Column( dt, col ) << set name( Format( Num( col ), "d/m/y" ) ),
Column( dt, col ) << set name( Substr( col, 2 ) )
)
);
Jim