Hi,
Thanks to the fellow board users, I have a script working that includes column switchers and local data filters. The script works as intended and the next step is I wanted to package as an add-in for the client base. I think I details of the add-in working and I can launch the script and it goes through the data import, clean up and summarization and makes the interface. HOWEVER, the interface is now giving me errors when I try to execute the column switcher that worked fine if I launch the script by itself. If I click on a new item in the column switcher I get the following error I have attached the code than creates this view. In my code I attach this to a summary data table and then execute it from within the script. If I run via add-in (where I just attached the script) it gives error. If I then close that window and click the button on the data table build the same display it works as intended without errors. So I am a bit confused as what I should change and insights?
Andy
cell_sum << new script(
"Main Interface",
cell_sum = Current Data Table();
test = Fit Group(
Oneway(
Y( :Max Discharge Capacity ),
X( :Cathode Recipe.x ),
Quantiles( 1 ),
Means( 1 ),
Box Plots( 1 ),
Mean Diamonds( 0 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
Grand Mean( 0 ),
),
Oneway(
Y( :"Cycle Number (>0.8)"n ),
X( :Cathode Recipe.x ),
Quantiles( 1 ),
Means( 1 ),
Box Plots( 1 ),
Mean Diamonds( 0 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
Grand Mean( 0 ),
),
Oneway(
Y( :"Discharge Capacity @ 50 Cycles"n ),
X( :Cathode Recipe.x ),
Quantiles( 1 ),
Means( 1 ),
Box Plots( 1 ),
Mean Diamonds( 0 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
Grand Mean( 0 ),
),
Oneway(
Y( :"Remain % @ 50 Cycles"n ),
X( :Cathode Recipe.x ),
Quantiles( 1 ),
Means( 1 ),
Box Plots( 1 ),
Mean Diamonds( 0 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
Grand Mean( 0 ),
),
<<{Arrange in Rows( 4 )}
);
colpick = test << Column Switcher(
:Cathode Recipe.x,
cell_sum << get column names( Ordinal, Nominal )
);
(test << top parent)[listboxbox( 1 )] << set script(
Try( test << remove local data filter );
mycurrent = ((test << top parent)[listboxbox( 1 )] << get selected)[1];
test << Local Data Filter(
Add Filter( columns( Column( mycurrent ) ), Display( Column( mycurrent ), N Items( 15 ), Find( Set Text( "" ) ) ) )
);
);
test << Local Data Filter(
Add Filter( columns( colpick << get current ), Display( colpick << get current, N Items( 15 ), Find( Set Text( "" ) ) ) )
);
);
cell_sum << run script( "Main Interface" );