Order_Cancelled
Order_Cancelled = 7
Example
procedure ScriptEvent(var Value: variant);
var
OrderStatusNum: Integer;
begin
OrderStatusNum := Order_Cancelled;
Value := GetOrderStatusCode(OrderStatusNum); // 'Cancelled'
end;
Usage
Order_Cancelled identifies the Cancelled order lifecycle state as Order_Status.Num value 7 for Velox scripts and order event configuration.
Value
| Property | Value |
|---|---|
| Script type | LongInt |
| Numeric value | 7 |
| Canonical text | Cancelled through Order_Cancelled_String |
| Database domain | Order_Status.Num |
Additional Technical Info
Order_Cancelled is the script-visible LongInt identifier for the Cancelled order lifecycle state. Its fixed value is 7. Use it with order StatusNum fields, the order-status conversion functions and order status-event configuration.
Reading the constant identifies a state; it does not transition an order, persist a value or dispatch an event.
Implementation
Velox declares the native constant as 7 and registers the same LongInt value with PascalScript. GetOrderStatusCode maps it to Cancelled; GetOrderStatusNum performs the reverse mapping. The numeric name is also registered in the Velox constant tag map, so <!Order_Cancelled!> expands to 7.
A fresh VxData database seeds Order_Status row 7 with description Cancelled. The domain is referenced by Order_Hdr.StatusNum, Order_Consignee.StatusNum, Order_Event.StatusNum and Order_Event_Type.StatusNum.
Behaviour
Use Order_Cancelled only with a field or API that explicitly uses the order lifecycle-status domain. GetOrderStatusCode returns Cancelled for this value. GetOrderStatusNum recognises that token case-insensitively but does not trim whitespace.
Order_Event_Type can associate an order type/status pair with send or notification event types. Some seeded combinations contain null event columns, particularly for later lifecycle states, so this constant does not guarantee that any event is configured or sent.
Edge cases and quirks
- Do not confuse lifecycle
StatusNumwith a generalStatuscolumn. General status uses the separate issue/presentation scale, not values 1-7 fromOrder_Status. - Numeric values are not type-safe in PascalScript and overlap other type/status families. Use the identifier belonging to the documented field domain.
Order_Statusstores the text inDescription; it has no separateCodecolumn.- The number-to-text converter returns
NullforNullor an unsupported number rather than selecting a default state.
Side effects
Reading Order_Cancelled, expanding its numeric tag or comparing it has no I/O or state-changing side effect. Database writes, lifecycle transitions and event dispatch belong to the caller or module.
Errors
Reading the constant does not raise an error. A value from the wrong numeric domain can select incorrect logic, and persistence outside valid Order_Status keys can fail a relevant foreign-key constraint.
Performance and concurrency
This is an immutable compiled value. Access and comparison are constant-time, allocate no persistent resource and carry no shared mutable state.
Remarks
The example is source-reviewed and non-destructive. It exercises only the fixed numeric-to-code converter.
Related entries
Order_Cancelled_Stringis the paired canonical text.GetOrderStatusCodemaps supported numbers to text.GetOrderStatusNummaps recognised text to a number.