Skip to main content

Intf_ASN

Intf_ASN = 2

Example

procedure ScriptEvent(var Value: variant);
begin
if DATA_Interface['Num'].AsInteger = Intf_ASN then
Value := Intf_ASN_String;
end;

Usage

Intf_ASN identifies the ASN module by its fixed Interface.Num value 2 for scripts, database references and Velox numeric tags.

Value

PropertyValue
Script typeLongInt
Numeric value2
Database rowInterface.Num = 2
Interface codeASN
Module rowYes (IsModule = 1)
Fresh-build defaultActive = 0; IsConfigured = 0

Additional Technical Info

Intf_ASN is the script-visible LongInt identifier for the ASN module interface. Its value is the fixed Interface.Num key 2.

Use the numeric constant where Velox expects an interface key or InterfaceNum. Use Intf_ASN_String where an interface code is required.

Implementation

Velox declares the native constant in vxVeloxEDI.pas and registers the same value with PascalScript through uPSI_vxVeloxEDI.pas. The fresh-build Interface table seeds row 2 with code ASN.

InitVeloxConstMap also adds the exact name Intf_ASN and value 2 to the case-insensitive Velox tag dictionary. Consequently, configuration processed by ProcessVeloxTags can expand:

<!Intf_ASN!>

to the decimal text 2. Tag expansion is a separate configuration feature; reading this script constant does not run tag processing.

Behaviour

  • The value is a compile-time constant. Reading it performs no database query and does not inspect the current Interface row.
  • It is suitable for numeric comparisons with DATA_Interface['Num'], InterfaceNum foreign keys and functions that explicitly accept an interface number.
  • The paired String constant is separately registered. Velox does not calculate either member of the pair from the other at runtime.
  • Tag lookup is case-insensitive for the name between <! and !>; replacement emits an unquoted decimal string.

Edge cases and quirks

  • The constant establishes identity only. It does not prove that the ASN module is licensed, enabled, configured, active or valid for the current action.
  • A fresh database sets Active = 0 and IsConfigured = 0 for this row. Administrators and upgrades can change row state without changing the compiled constant.
  • Interface numbers 14-19 are reserved blank rows, so the numeric sequence is intentionally sparse between module interfaces 1-13 and reference interfaces 20 onward.
  • The source constants and seed data are maintained in parallel rather than generated dynamically at runtime. Treat a source/database disagreement as a deployment-version problem.
  • Numeric tags exist only for names deliberately entered in gVeloxConstMap. Do not assume every script constant is a valid Velox tag.

Side effects

Reading or comparing the constant has no side effects. Operations that consume it may read or modify data associated with interface 2; their own documentation controls those effects.

Errors

The constant itself cannot fail. A database operation can still fail when the corresponding row is absent, inactive, inaccessible or inconsistent with the deployed product version. An unknown <!...!> tag causes tag processing to raise an invalid-tag exception rather than leaving the token unchanged.

Performance and concurrency

Constant access and tag-dictionary lookup are constant-time operations. The value is immutable and thread-safe. Current database configuration is mutable shared state, so check it explicitly when the operation depends on active/configured status.

Remarks

Prefer this named constant over the literal 2. It preserves the business meaning in scripts and protects the script from accidental renumbering assumptions.

  • Intf_ASN_String — exact String code for the same interface.
  • DATA_Interface — reusable dataset commonly used to load interface row data.
  • ProcessTags — expands supported <!...!> numeric tags in configuration text.

External references

No Delphi or Free Pascal equivalent applies. This identifier and its database meaning are Velox-owned.

Created 2026-07-15