Hello All,
I'm trying to write a script that creates a subset based on two choices in a dynamic combo box. It seems like the dialog portion is good since my variables are being saved as I select them, but the actual generation of the subset is not working.
/* temporarily remove open database portion */
clearGlobals():
ER_Temp = Open( "C:\Users\Kilik\Desktop\Tbl_RIE_ERS.jmp" );
/* Extract a list of unique films in set "a" and unique tools in set "b"*/
Summarize( a = By( :Film ) );
Insert Into( a, "<Select Film>", 1 );
Summarize( b = By( :Tool ) );
Insert Into( b, "<Select Tool>", 1 );
/* Create a dialog*/
New Window( "Example",
<<Modal,
H List Box(
/*Creates a box from which to select the film*/
Panel Box( "Select a Film:",
cb1 = Combo Box(
a,
<<SetFunction(
Function( {this},
myFilm = this << Get Selected();
)
)
)
),
/*Creates a box from which to select the tool*/
Panel Box( "Select a Tool:",
cb2 = Combo Box(
b,
<<SetFunction(
Function( {this},
myTool = this << Get Selected();
)
)
)
),
)
);
//creates a subset based on both selections
ER_Temp << clearRowStates;
ER_Temp << selectWhere((:Film == myFilm)&(:Tool==myTool));
Selection = ER_Temp << Subset(output table name("selection")));
Thanks,
David