FWFormStruct and MVC structures
Creates distinct Model and View metadata.
Overview
FWFormStruct uses type 1 for Model and 2 for View. bSX3 receives a field ID and returns a logical inclusion decision. The owned table dictionary must exist first. Visible-field selection is not business validation, which remains a Model responsibility. The example only prepares constructors for ZZ1 without activation, SX3 changes or table creation. Extra Browse references in TDN are not generalized into this three-argument subset. (Sources: refs. 1–1.)
Commented example
// Fragment: ZZ1 and ZZ1_COD are registered in the test environment.
bModel := {|| FWFormStruct(1,"ZZ1",{|cField| AllTrim(cField)=="ZZ1_COD"})}
bView := {|| FWFormStruct(2,"ZZ1",{|cField| AllTrim(cField)=="ZZ1_COD"})}Prepared blocks for distinct structures; no dictionary lookup performed. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Check SX2 alias and exact field selection before evaluation.
- 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.