Hi,
I would like to make dialog with preselected column name which you can change or choose some other if they are not in dataset. The problem is that I am not able to use these chosen ones later.
So here is my code:
Clear Globals();
dt = Current Data Table();
If( Is Empty( dt ),
dt = Open()
);
col_name_list = dt << get column names( string );
Show( col_name_list );
dialogADMI = Empty();
If( Contains( col_name_list, "ADJMI Rev2" ),
dialogADMI = Column( "ADJMI Rev2" )
);
dialogMIPLdraw1 = Empty();
If( Contains( col_name_list, "MIPLdraw1" ),
dialogMIPLdraw1 = Column( "MIPLdraw1" )
);
dlg = Column Dialog(
ADMI2 = Col List( "ADJMI Rev2",
Min Col( 1 ),
Max Col( 1 ),
Columns( dialogADMI )
),
MIPLdraw1Col = Col List( "MIPLdraw1",
Min Col( 1 ),
Max Col( 1 ),
Columns( dialogMIPLdraw1 )
),
);
Show( dlg["Button"] );
If( dlg["Button"] == -1,
Throw()
);
Remove From( dlg );
Eval List( dlg );
ADMI2 = ADMI2[1] << get name;
MIPLdraw1Col = MIPLdraw1Col[1] << get name;
// Until here I think everything is fine
// But next sted does not work
dt <<
Select Where(:MIPLdraw1Col != "") <<
Subset(
columns (:Patient, :ADMI2, :MIPLdraw1Col),
Output Table Name("Draw1"),
);
;
// So I try to Select those with has not empy in MIdraw1Col
// And I got this: dt << Select Where( :MIPLdraw1Col/*###*/ != "" ) <<
// This works if use the original name of the column MIPLdraw1 but I want to have the possibility to use some other column name
// So how should I do it?