Hi,
could you please help me with scripting. I would like to create new columns automatically. The part below "//Pad(+N_Pad) - column (start) ..." works, when the list_XRF={"DW", ..} was defined within the script and used.
But, how to create a "dialog window", that enables to enter a list with (if possible variable) items, that will be used for the following script "//Pad(+N_Pad) - column (start) ..."
Names Default To Here( 1 );
dt = Current Data Table();
list_XRF = "";
//a=b=c=d=e=f=g=h=i=j=k=l=
//a,b,c,d,e,f,g,h,i,j,k,l,
m = n = o = p = "";
New Window( "Define Pad types",
Modal,
<<Return Result,
Outline Box( "Please define", Table Box( list_XRF = String Col Edit Box( "Pad types", {m, n, o, p} ) ) )
);
//Pad(+N_Pad) - column (start)
//list_XRF ={"DW", "DW", "SI", "SI"}; // pad type for each set of XRF measurements
dt << New Column( "Pad", "character", values( Repeat( list_XRF, Floor( N Rows( dt ) / N Items( list_XRF ) ) ) ) );
// Create Cumulative Frequencies
dt << New Column( "N_pad", Numeric, Continuous );
dt:N_Pad << Set Each Value( If( Row() == 1, 1, :Pad == Lag( :Pad, 1 ), Lag( :N_Pad, 1 ) + 1, 1 ) ); // end set each value
//Pad(+N_Pad) - column (end)