SX3 — Fields
Defines field structure and properties.
Overview
SX3 connects structure and presentation: field consumers must respect type, length, decimals and rules. Avoid hardcoded product-code length when dictionary configuration can vary. The community example reads length/decimals from TamSX3’s first two positions; this adaptation validates type/length before indexing without claiming those are all possible positions. It changes no metadata and its result depends on configuration. (Sources: refs. 1–2.)
Commented example
#Include "Protheus.ch"
User Function Ed683()
Local aInfo := TamSX3("B1_COD")
// Validate the observed shape before indexing.
If ValType(aInfo) == "A"
If Len(aInfo) >= 2
ConOut(aInfo[1])
ConOut(aInfo[2])
EndIf
EndIf
Return NilOn a prepared environment displays B1_COD length/decimals if the return matches the expected shape. Values are not fixed here. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Length changes require reviewing field groups, indexes, integrations and physical schema; use supported tooling and validate dependencies.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.