GetShipmentManifestTypeCode
Function GetShipmentManifestTypeCode(const aShipmentType : Variant) : Variant;
Example
procedure ScriptEvent(var Value: variant);
begin
Value := GetShipmentManifestTypeCode(1); // 'CustomerShipment'
end;
Usage
GetShipmentManifestTypeCode converts a Velox shipment-manifest type number to its canonical code.
Parameters and result
| Item | Type | Description |
|---|---|---|
aShipmentType | Variant, const | Numeric shipment-manifest type; use a listed integral value. |
| Result | Variant | Canonical code string for a recognized value; otherwise Null. |
Complete mapping
| Number | Code |
|---|---|
1 | CustomerShipment |
2 | SupplierShipment |
Behaviour and edge cases
- With Velox's default loose
NullEqualityRule, Null follows the explicit guard. Because the rule is shared across the Velox process, strict or error settings can alter or break that comparison. - Use integral constants from this family. Do not depend on Variant coercion from strings, floats or booleans.
- Unknown comparable values return
Null; incompatible arrays/interfaces can raise conversion/operator exceptions that propagate. - Reused labels or numbers in another Velox status/type family are not semantically interchangeable. Use the function matching the field.
Additional Technical Info
GetShipmentManifestTypeCode converts a numeric shipment-manifest type to its canonical Velox code. The complete map is compiled into product source and is not read from customer configuration.
Implementation
The source evaluates aShipmentType = Null, then uses a case over the listed constants. A recognized branch returns its fixed counterpart; the fallback returns Null. No database or alias configuration is consulted.
Side effects, errors and performance
For supported input the function is pure, does no I/O and runs over a small fixed mapping. Variant comparison or conversion errors propagate.
Related entries
GetShipmentManifestTypeNumperforms the reverse conversion.- Embarcadero:
System.Variants.NullEqualityRule - Free Pascal:
NullEqualityRule