by
shaun78 » Wed Sep 16, 2015 1:04 am
Create a custom field that contains your average result.
For example, say you have a % Label Claim specification that is 90-110%.
1. Create a custom field that calculates the label claim.
2. Create a custom field that averages label claim for the samples you want.
3. Create an ENUM Peak Type field that sets your specification and translates to Pass / Fail.
Example:
1+2: SAME.%.%.AVE((Amount/LC)*100) custom field called AVE_LC
3. ENUM((LTE(AVE_LC,89.49)),(RANGE(AVE_LC,89.5,110.49)),(GTE(AVE_LC,110.5))) called Accept
The following values and translations are used for the ENUM field above:
Value Translation
0 FAIL
1 PASS
2 FAIL
Here is the logic:
LTE(AVE_LC,89.49) = average label claim less or equal to than 89.49. When displayed to a whole decimal specification as I noted above, the result is 89%, which is below your lower limit. This results in a FAIL.
RANGE(AVE_LC,89.5,110.49) = average in the range of 89.5-110.49. When displayed as a whole decimal specification the resulting range is 90-110. This results in a PASS.
GTE(AVE_LC,110.5) = average label claim greater than or equal to 110.5. When displayed to a whole number specification as noted, the result is 111. This results in a FAIL.
The trick of this is your ENUM field needs to be written to two decimals more than your specification in order to avoid potential failures/passes as a result of rounding rules.
To include multiple batches it comes down to sample label. The (SAME.%.%.AVE(Amount/LC)*100) will group samples and average in accordance with samples given the SAME label in the sample set method.
To include multiple specifications it comes down to how that LC field in the equation above is setup. You can make it a user entry field in the sample set method. The user enters their value unique to their sample. This works well enough. The extra step would be to create a drop down list in the sample set that the user selects a value from (this will reduce error). This drop down list is an ENUM field. The ENUM field i have listed in step three becomes a little more complicated as you have to have a component for each selection.
For example, say the user selectable %LC field in the sample set is called Potency and has a value of 2 or 4: ENUM((EQ(Potency,2))&(LTE(AVE_LC,89.49))|((EQ(Potency,4))&(LTE(AVE_LC,89.49)).
In the exmaple above we have Poetncy=2 AND average LC less than or equal to 89.49 OR Potency=4 AND average LC less than or equal to 89.49 results in a FAIL.
P.S. I consult companies for Empower customization similar to this on the side if you are interested. Reach out to me over forums if interested.