Customizing Guidelines and Restrictions Check
To enable customization of guideline and restriction checks, two script hooks are
provided on the
FGUIDELINE
symbol. The hook methods are called after the
standard guideline checks are run and can be used to add custom guidelines. The hooks are postGRItemCheck
and postGRParamCheck
.
If the guideline check involves more than one formula, the script hook methods are called for each individual formula.
For convenience, the following script variables are provided for use inside the hook
methods:
Global Variable | Description |
---|---|
_FORMULAGLINGR |
Top level ingredients |
_FORMULAGLLINEEXP
|
Ingredients exploded only to raw material level |
_FORMULAGLLINEEXPRM |
Ingredients explode to constituent raw materials |
_FORMULAGLPARAMETERS
|
All parameters on Formula |
_FORMULAGLCUSTOMERS |
Referenced customers on Formula |
_FORMULAGLVENDORS |
Referenced vendors on Formula |
_FORMULAGLSELLINGLOCATIONS |
Context selling locations |
_FORMULAGLMFGLOCATIONS |
Context manufacturing locations |
_FORMULAGLBRANDS |
Context brands |
_FORMULAGLPRODUCTTYPES |
Context product types |
_FORMULAGLENDUSES |
Context end uses |
_FORMULAGLENDUSERS |
Context end users |
_FORMULAGLTESTINGCOMPANIES |
Referenced testing companies |
_FORMULAGLMFGCOMPANIES |
Referenced manufacturing companies |
_FORMULAGLOTHERCOMPANIES |
Referenced other companies |
All variables are string arrays; therefore, they should be compared to nothing before using them.