IsSourceInternal
Function IsSourceInternal(const aSourceNum : integer) : boolean;
Example
procedure ScriptEvent(var Value: variant);
begin
Value := IsSourceInternal(1); // True: App
end;
Usage
IsSourceInternal returns true only for Velox's internal App source number 1.
Parameters and result
| Item | Type | Description |
|---|---|---|
aSourceNum | integer, const | Source number to classify. |
| Result | boolean | True only when aSourceNum = 1; otherwise False. |
Behaviour and security boundary
- A
Falseresult means only “not the App constant”; it does not prove that the value is a valid external source. - Zero, negative and future/unknown source numbers all return
False. - The source number is metadata, not authentication. Do not grant trust merely because a value equals
1unless the surrounding Velox flow has established and protected that value. - Use
GetSourceCodeand test forNullif validity as one of the current four source constants matters. IsSourcePartneris the exact complement and consequently returnsTruefor invalid numbers.
Additional Technical Info
IsSourceInternal reports whether a numeric source is exactly Velox source 1 (App). Every other integer returns False, including all recognized external sources and invalid values.
Source classification
| Value | Canonical source | Result |
|---|---|---|
1 | App | True |
2 | EDI | False |
3 | Web | False |
4 | API | False |
| any other integer | invalid/unknown | False |
Implementation
The imported function is one exact expression: Result := (aSourceNum = 1). It does not call GetSourceCode, inspect request/session state or consult configuration.
Side effects, errors and performance
The function is pure, constant-time and performs no I/O. Every integer has a defined Boolean result.
Related entries
IsSourcePartnernegates this result.GetSourceCodeandGetSourceNumprovide the validated four-value mapping.