Skip to main content

GetNameForModuleType

Function GetNameForModuleType( aType : string) : string

Example

procedure ScriptEvent(var Value: variant);
begin
Value := GetNameForModuleType('TvxActionMan'); // 'Flow'
end;

Usage

GetNameForModuleType returns Velox's display label for a recognized module class name, or echoes an unknown name unchanged.

Parameters and result

ItemTypeDescription
aTypestring, by valueExact Velox module type name to translate. The function does not trim or normalise it.
ResultstringFixed label for a recognized value; otherwise exactly aType.

Additional Technical Info

GetNameForModuleType translates selected internal Velox module class names into short user-facing labels. It uses a fixed, case-sensitive source table. If aType is not recognized, the function returns the supplied text unchanged.

This is a display-name helper, not a class lookup, type test or module loader.

Complete recognized mapping

Input class name(s)Result
TvxDBConDB Connection
TvxDBDefDB Definition
TvxFileConFile Connection
TvxFileDefXML, TvxFileDefFlat, TvxFileDefJSON, TvxFileDefExcel, TvxFileDefEDIFile Definition
TvxTransportHTTPIn, TvxTransportIMAP, TvxTransportPOP, TvxTransportFTPIn, TvxTransportSFTPIn, TvxTransportLANIn, TvxTransportMSMQIn, TvxTransportIBMMQInInbound Transport
TvxTransportHTTPOut, TvxTransportFTPOut, TvxTransportSFTPOut, TvxTransportLANOut, TvxTransportMSMQOut, TvxTransportIBMMQOut, TvxTransportSMTPOutbound Transport
TvxReportReport
TvxSQLScriptSQL Script
TvxScriptletScriptlet
TvxMapMap
TvxActionManFlow
TvxAPIAPI
TvxLogLog
TvxFolderFolder

Implementation

The scripting import binds directly to vxCommon.GetNameForModuleType. That function evaluates an if/else if chain of exact Delphi string equalities in the order represented above and falls back to Result := aType.

Behaviour and edge cases

  • Matching is case-sensitive: TvxMap returns Map, while tvxmap is unknown and returns tvxmap.
  • Leading or trailing whitespace prevents recognition and is preserved in the fallback result.
  • Empty input returns an empty string.
  • Several concrete transport/file-definition subclasses intentionally share one general label.
  • Base or newer/custom class names not listed above are echoed. An echoed value does not prove that the class exists or is supported.
  • TvxActionMan deliberately displays as Flow; scripts should not derive display labels by removing the Tvx prefix.
  • Because unknown text is returned rather than marked with Null or a Boolean, callers cannot detect recognition by testing for a non-empty result. Compare against a known input/label only when recognition matters.

Side effects, errors and performance

The function is pure, performs no I/O and changes no state. It performs a bounded fixed comparison chain. Ordinary string input has no domain-specific error path.

Related entries

  • This helper accepts internal Delphi class names. The FID functions instead resolve configured MODULENAME values to persistent identifiers.
  • Treat the returned value as a label only; use the actual module metadata and APIs for type-sensitive behavior.
Created 2026-07-15