Hi everyone,
I want to use the following script to define in a pop-up window the lower and upper spec limits (LSL and USL) and use the values in order to set the column properties for the spec limits. On top of that, I have a formula column called "check", where I want to use the values within the formula to check if the value in the row is within the spec ranges or not.
The code is running but the values are not entered for the spec limits or in the formula.
// Just some code to create a test tableNew Table( "test",
Add Rows( 10 ),
New Column( "LA",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[4172.33500363846, 4003.0454164522, 5132.51142953179, 4254.16795732848,
4202.75172580535, 3574.47256743923, 3804.96534319603, 3915.70034276743,
4319.47567126139, 4094.59235385003]
),
Set Display Width( 73 )
),
New Column( "UA",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[59507.3313010261, 53541.4856212676, 71149.6162777807, 59578.8338627777,
56630.4195099436, 50900.019384575, 51479.1947874623, 53642.2158390849,
61673.2466126228, 56337.4407587715]
),
Set Display Width( 73 )
),
New Column( "95CIupr SD LA",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[1043.86456772353, 876.888513223994, 1136.27463369684, 970.028749878648,
954.598082854551, 941.489444193772, 846.345601078669, 801.488231630083,
973.917277695926, 934.431089864531]
),
Set Display Width( 81 )
),
New Column( "95CIupr SD UA",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[3068.69934323136, 2352.88265793793, 4263.23712733597, 2974.99490133574,
2684.01670727501, 2048.97811082407, 2128.8899692482, 2298.27809836615,
3264.19929423158, 2671.90896127954]
),
Set Display Width( 83 )
)
)
//define default values for number edit boxes
UA_LSL = 0.8; // numbers with default
UA_USL = 1.2; // number with default
UA_LA_LSL = 0.8; // number with default
UA_LA_USL = 1.2; // number with default
//code for the pop-up window
w = New Window( "SST simulation", <<MODAL> UA_USL | :"UA1-LA1/UA2-LA2"n < UA_LA_LSL | :"UA1-LA1/UA2-LA2"n > UA_LA_USL,
"Outside",
"Inside"
)
),
Set Selected,
Set Display Width( 50 )
);
</MODAL>
Greetings
/Marco