AfterConsolidationColumnsCalculated
Within the data import it is possible to fill some cells based on values in other cells.
One use is to define a price for not serving.
General syntax:
Condition?Yes:No
<AfterConsolidationColumnsCalculated>
<string>job;notservedpenalty;job;notservedpenalty;job;info2;f0;jobinfo2><Podmínka?Ano:Ne</string>
</AfterConsolidationColumnsCalculated>
Example 1: Derive the cost of not serving a job from the text
Input data CSV | Required numeric value |
Cash on delivery - DPD | 149 |
Toptrans XXL | 350 |
DPD - payment in advance | 149 |
DPD - Basic postage and packing | 149 |
Syntax
<AfterConsolidationColumnsCalculated>
<string>job;notservedpenalty;job;notservedpenalty;job;info2;f0;jobinfo2><Dobírka - DPD?149:jobnotservedpenalty</string> <string>job;notservedpenalty;job;notservedpenalty;job;info2;f0;jobinfo2><DPD - Dopravné a balné XXL?350:jobnotservedpenalty</string> <string>job;notservedpenalty;job;notservedpenalty;job;info2;f0;jobinfo2><DPD - Základní poštovné a balné?149:jobnotservedpenalty</string> <string>job;notservedpenalty;job;notservedpenalty;job;info2;f0;jobinfo2><DPD - platba předem?149:jobnotservedpenalty</string>
</AfterConsolidationColumnsCalculated>
Dobírka - DPD?90:jobnotservedpenalty
Example 2: From a numerical value
Carrier's price list:
Input data CSV (column weight) |
Required numerical value |
39,6 | 57 |
18 | 55 |
1 | 50 |
30 | 57 |
Syntax:
<AfterConsolidationColumnsCalculated>
<string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=50?69:jobnotservedpenalty</string> <string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=48?67:jobnotservedpenalty</string> <string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=47?65:jobnotservedpenalty</string> <string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=45?63:jobnotservedpenalty</string> <string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=43?61:jobnotservedpenalty</string> <string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=41?59:jobnotservedpenalty</string> <string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=25?57:jobnotservedpenalty</string> <string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=20?55:jobnotservedpenalty</string> <string>job;notservedpenalty;stop1;demand1;job;notservedpenalty;f0;stop1demand1<=10?50:jobnotservedpenalty</string>
</AfterConsolidationColumnsCalculated>
Note:
The terms of the numerical values converted to a price for not serving need to be sorted from the highest value to the lowest.
Example 3 - Change colour based on total order weight:
In the SolutionView map we want to distinguish orders with total weight up to 50 kg, 50-99 kg, 100-199 kg and 200kg+ by colour.
Syntax (note, the colour syntax differs from the syntax in ColumnsCalculated):
<AfterConsolidationColumnsCalculated>
<string>dynamic;color;dynamic;color;stop1;demand1;;stop1demand1<51?Color[LawnGreen]:dynamiccolor</string> <string>dynamic;color;dynamic;color;stop1;demand1;;stop1demand1>50?Color[Khaki]:dynamiccolor</string> <string>dynamic;color;dynamic;color;stop1;demand1;;stop1demand1>100?Color[DarkSlateBlue]:dynamiccolor</string> <string>dynamic;color;dynamic;color;stop1;demand1;;stop1demand1>200?Color[MediumVioletRed]:dynamiccolor</string>
</AfterConsolidationColumnsCalculated>
Possible colours