I have a transpose with an odd symptom
When the transpose executes and the first cell in a column is "Batch 0" and all the subsequent cells are empty, I would like to fill those cells as "Batch 1". Any clue how I could do that?
Here is a little script that will do what you want
If( :"RSC TCANEAL/ furnace/ 5139"n[1] == "Batch 0", Try( :"RSC TCANEAL/ furnace/ 5139"n[Current Data Table() << get rows where( Is Missing( :"RSC TCANEAL/ furnace/ 5139"n ) )] = "Batch 1" ) );
Here is a complete example
Names Default To Here( 1 ); New Table( "Example", Add Rows( 25 ), New Column( "RSC TCANEAL/ furnace/ 5139", Character, Set Values( {"Batch 0", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""} ) ) ); If( :"RSC TCANEAL/ furnace/ 5139"n[1] == "Batch 0", Try( :"RSC TCANEAL/ furnace/ 5139"n[Current Data Table() << get rows where( Is Missing( :"RSC TCANEAL/ furnace/ 5139"n ) )] = "Batch 1" ) );
Jim, thanks. I modified this to iterate through columns from 4 onward and only act on columns that were empty apart from the first row.
colList1 = Data Table( "Transpose of History" ) << get column names( string );<BR /><BR />For( i = 1, i <= N Cols( Data Table( "Transpose of History" ) ), i++, If( Column(colList1[i])[1] == "Batch 0" & Col N Missing( As Column(colList1[i]) ) == NRow()-1, Try( Column(colList1[i])[Current Data Table() << get rows where( Is Missing( As Column(colList1[i]) ) )] = "Batch 1" ) ) );