Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

FWFormStruct and MVC structures

Creates distinct Model and View metadata.

FWFormStruct and MVC structuresAdvPL
01 · OVERVIEW

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.)

03 · PRACTICAL EXAMPLE

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"})}
Expected result

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.

BEST PRACTICES
  • 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.

Related content

REFERENCES
  1. TOTVS. FWFormStruct. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha