After writing the formula and pressing Generate, how do you notice that a cell came out at zero or that an adjustment moved a price you didn't mean to touch? The grid's page has a tab designed for this: Diagnostics. You find it in Settings → Prices lists, products and services → Price grids (detailed pricelist), by opening a grid and pressing the Diagnostics tab (next to Main and Configuration). It is for whoever sets up and maintains the marina's prices.
1. What the tab contains
Box | When it appears |
|---|---|
Formula diagnostics | Only if there is something to flag. If the grid is in order, it is not there. |
Regression cases | Always. |
Referenced by these grids | Only if other grids call it with |
The flags are advice: they block nothing and change nothing on their own.
2. Formula diagnostics
The box reads the already generated matrix and the grid's formulas, and can show these flags:
Flag | What it means |
|---|---|
Zero or negative prices | Cells with a value equal to or below zero, usually a wrong formula or limit. For each you see column, band and value. |
Prices that decrease as size grows | In the same column a larger band costs less than a smaller one: often it is a rounding that moves the price. You see the two bands compared. |
Cells selling at or below cost | A cell's purchase cost is equal to or higher than the rate. For each you see sale, purchase and margin (see Purchase costs and margin in price grids). |
Undefined references | A formula uses a |
“These parameters are defined but used in no formula:” | List of the parameters you can remove, or that you forgot to use. |
Numeric constants | Numbers written inside formulas that are worth turning into a parameter, so you adjust them in one place. 0 and 1 are not suggested. |
If a flag has many rows, you see the first twenty and then the count of the more.
The references flag checks parameters and variants: it does not check calls to GRID(), whose errors only appear when you press Generate.
Turning a constant into a parameter
In the constants table, for each number you see Value, In (in which formula it appears) and Occurrences. Next to each one there is Extract to parameter:
Press Extract to parameter: a window opens saying “The constant … will be replaced in the formula by params.CODE.”.
Check the Code (the program proposes
p_followed by the number; letters, digits and underscores, and it must start with a letter), write a readable Label and leave the Value equal to the constant, if you don't want to change the prices.Press Create parameter.
The program creates the parameter and, in the indicated formula, replaces the number with params.CODE. “Parameter "…" created and used in the formula. Regenerate to apply.” appears: press Generate so the matrix uses the new formula. If a parameter with that code already exists you get “A parameter "…" already exists on this grid.”.
3. Regression cases
A regression case is a promise: “for this sample boat, the cell must cost this price”. The grid rechecks it every time you open the page, so a change to the formula, the parameters or the scale that moves that price does not go unnoticed.
Pinning a case
In the Regression cases box press Pin a case.
In the Pin a regression case window write a Label (for example 12 m diesel single engine) and the Expected price.
Under “Sample boat (fill only what your grid uses):” enter the boat's data: length, width, m² (empty = length × width), type, number of engines, HP, fuel, transmission and generator kW. Fill in only those that the grid's scale, variants and applicability read.
Press Pin a case: “Regression case pinned.” appears.
To know which price to write as expected, it is better to first test the boat with Test with a sample boat (see Testing a grid): if the price is the right one, you pin it.
Reading the cases
The table has the columns Label, Expected, Actual and Status. Next to the box's title you see how many cases pass, for example 3/4.
passed: the cell's actual price matches the expected one (to within a cent).
failed: the price is different, or the cell is not there (boat outside all the bands, no matching column): in this case Actual shows a dash.
The comparison concerns the cell's price in the matrix, the one you see in the table (a hand-chosen price counts the same as a generated one). It does not check applicability, quantity or period.
The bin at the end of the row deletes the case, after the confirmation “Delete this case?”.
How to use them well
When a grid is right, pin three or four boats that cover the typical cases: a small one, a large one, one with the most used variants. Then every time you change a formula, a parameter or the scale's bands and press Generate, reopen the Diagnostics tab: if a case is failed, you have moved a price. If you did it on purpose, delete the case and pin a new one with the updated price.
If something goes wrong
I don't see the Formula diagnostics box. There is nothing to flag, or the matrix is not yet generated: press Generate in the Main tab and reopen the tab.
A case is failed but the price looks right. Look at Actual: if it is a dash the cell was not found (the sample boat is outside the bands, or no column matches its data); if it is a different number, update the case.
After “Extract to parameter” the prices have not changed. It happens until you regenerate: press Generate.
