The primary issue with the JSL is that the closing parentheses for the Summary Platform, included all of the JSL for the creation of the new columns. The Summary Platform needs to be completed and then the new columns are added.
Secondly, since the specifics of the actual names for the columns in the data table being created in the Summary Platform, there is not a need to use the complexity of code that you are attempting. In my example below, I have simplified your code.
Third, I have changed your code to make data table references more specific to make the code more readable and to make sure JMP knows exactly what data table to work on. Also, I changed the references to columns that have complex names from the structure
:Name( "name" )
to
:"name"n
which is the announced structure that will be used moving forward.
Data Table( "semiconductor capability" ) << Summary(
Group( :"90440011_119325"n ),
N,
Subgroup( :Sort_Lot ),
Freq( "None" ),
Weight( "None" ),
Output Table( "New Table" )
);
Data Table( "New Table" ) << New Column( "GD1",
Numeric,
"Continuous",
Formula( Sum( :"N(1)"n, :"N(2)"n, :"N(3)"n ) )
);
Current Data Table() << New Column( "Test",
formula(
If( Contains( Data Table( "New Table" ) << get column names( string ), "N(4)" ),
Sum( :GD1, :"N(4)"n ),
If( Contains( Data Table( "New Table" ) << get column names( string ), "N(5)" ),
Sum( :GD1, :"N(5)"n ),
Sum( :GD1 )
)
)
)
);
Jim