I figured this one out I think. Excuse the clumsy check list boxes, they need a lot of work but otherwise, the formula associates the selected metrics by matching the characters beyond the first 3. I can ensure the voltage threshold plots only against the relevant current for instance while also assessing multiple metrics in a single process.
SpannerHead
dt = Current Data Table();
dt << Clear Column Selection();
colList = dt << get column names( string );
check_list1 = {"VTX", "VTN", "VTP", "VTF", "IDS", "IBB", "ILK", "CMI"};
check_list2 = {"VTX", "VTN", "VTP", "VTF", "IDS", "IBB", "ILK", "CMI"};
nw = New Window( "X Value",
<<modal(),
my_cb = Check Box( check_list1 ),
Panel Box( "Actions",
H List Box(
Button Box( "OK",
keep_going = 1;
X = my_cb << get selected;
),
Button Box( "Cancel", keep_going = 0 )
)
)
);
nw = New Window( "Y Value",
<<modal(),
my_other_cb = Check Box( check_list2 ),
Panel Box( "Actions",
H List Box(
Button Box( "OK",
keep_going = 1;
Y = my_other_cb << get selected;
),
Button Box( "Cancel", keep_going = 0 )
)
)
);
Show( X );
Show( Y );
If(
X[1] == "VTX", Xparam = "VTX",
X[1] == "VTN", Xparam = "VTN",
X[1] == "VTP", Xparam = "VTP",
X[1] == "IDS", Xparam = "IDS",
X[1] == "IBB", Xparam = "IBB",
X[1] == "VTF", Xparam = "VTF",
X[1] == "ILK", Xparam = "ILK",
X[1] == "CMI", Xparam = "CMI"
);
If(
Y[1] == "VTX", Yparam = "VTX",
Y[1] == "VTN", Yparam = "VTN",
Y[1] == "VTP", Yparam = "VTP",
Y[1] == "IDS", Yparam = "IDS",
Y[1] == "IBB", Yparam = "IBB",
Y[1] == "VTF", Yparam = "VTF",
Y[1] == "ILK", Yparam = "ILK",
Y[1] == "CMI", Yparam = "CMI"
);
Show( Xparam );
Show( Yparam );
For( i = 1, i <= N Cols( dt ), i++,
If( Contains( Munger( Head Name( As Namespace( colList[i] ) ), 0, 3 ), Xparam ),
Column( colList[i] ) << Set Selected( 1 )
)
);
target = dt << get selected columns();
found_list = {};
Show( target );
New Window( "Compilation",
For( j = 1, j <= N Items( target ), j++,
If(
Contains(
Munger( Head Name( As Namespace( target[j] ) ), 0, 3 ),
Xparam
) & !Contains( Head Name( As Namespace( target[j] ) ), "Pass/Fail" ),
Connected = Substitute( Head Name( As Namespace( target[j] ) ),
Xparam, Yparam
);
Insert Into( found_list, Connected );
Try(
Bivariate(
Y( Column( dt, found_list[j] ) ),
X( Column( dt, target[j] ) ),
Automatic Recalc( 1 )
)
);
)
)
);
Thanks for the suggestions
Slán
SpannerHead