User-defined formulas make it possible to assign or derive quality results values. Values can be derived from user-defined formulas that are simple arithmetic expressions which use simple operators (+, -, *, /), specified values (3, 2, 4000, 'FAIL', 50), complex operators (square root, sin, cosine and so on), functions (SORT), and/or output variable tokens (&DEFECTIVE).
Examples3
3+2
'A'
(4000 + 34500)/50
'FAIL'
&DEFECTIVE/&QTY
&D + SQRT(&DISCREPANCY)/SQRT(&E)
ABS(&SEVERITY) + &BAD
'Defect '||&DEFECTCODE
Values can also be derived from user-defined SQL scripts which read values from Oracle database tables.
Examplesselect assigned_to from customer_reps
where customer_name = &CUSTOMER
and organization_id=:parameter.org_id
Attention: To constrain the SQL Statement to the current organization, you can use the variable ':parameter.org_id' for the current organization id. To constrain the SQL Statement to the current user's id, you can use the variable ':parameter.user_id' for the current user's id.