Usina BRAdvPL Guide
Sign in
← All topics
COMMANDUnder review

MSGET()

@ nLinha,nColuna MSGET variavel SIZE nLargura,nAltura OF oDlg PIXEL

Creates a variable-bound input field.

MSGET()AdvPL
01 · OVERVIEW

Overview

MSGET is a command that creates a variable-bound field inside a dialog. SIZE and PIXEL define dimensions; OF sets the container. VALID validates content and WHEN controls editing; PICTURE formats input without guaranteeing business rules. Syntax takes an editable variable, not a constant. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

@ nLinha,nColuna MSGET variavel SIZE nLargura,nAltura OF oDlg PIXEL

Parameters

variavel
VariableRequired

Field-bound variable.

coordenadas / SIZE
NumericRequired

Position and dimensions in the chosen unit.

Return value

UI command; no function return is documented for this syntax.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed540()
    Local oDlg
    Local cValue := Space(20)
    // SmartClient UI: close the window to finish.
    DEFINE MSDIALOG oDlg TITLE "Example" FROM 0,0 TO 100,300 PIXEL
    @ 12,12 MSGET cValue SIZE 100,12 OF oDlg PIXEL
    ACTIVATE MSDIALOG oDlg CENTERED
Return Nil
Expected result

Opens a window; closing it does not automatically save data. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Require a UI session and verify layout in the deployed client. Separate confirmation, cancellation and persistence; avoid modal dialogs in UI-less jobs.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. MSGET(). 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