Usina BRAdvPL Guide
Sign in
← All topics
FOUNDATIONPublished

Pictures and masks in AdvPL

PICTURE "@E 999,999.99" · "@!" · "@A"

Masks control display, editing and formatting of values in visual commands and reports.

PicturesMasksFormattingInterfaceReports
01 · OVERVIEW

Overview

Pictures are mask expressions used to format numeric values, dates, text and fields displayed in interfaces or reports. The introductory booklet mentions symbols such as @A, @E and @!, which remain useful to understand legacy examples and commands such as SAY, GET and PSAY.

02 · SYNTAX

Syntax

PICTURE "@E 999,999.99" · "@!" · "@A"
03 · PRACTICAL EXAMPLE

Formatted numeric value

#Include "TOTVS.ch"

User Function ExPictureValor()
    Local nTotal := 1520.75

    MsgInfo(Transform(nTotal, "@E 999,999.99"), "Total")
Return
Expected result

The mask controls numeric display with decimal places and separators.

04 · PRACTICAL EXAMPLE

Uppercase text

#Include "TOTVS.ch"

User Function ExPictureTexto()
    Local cNome := "cliente teste"

    MsgInfo(Transform(cNome, "@!"), "Nome")
Return
Expected result

The @! picture is used to display content in uppercase.

BEST PRACTICES
  • Use PICTURE compatível com o tipo do valor exibido ou editado.
  • @E é comum para formatação numérica conforme máscara informada.
  • @! força caracteres alfabéticos para maiúsculas em contextos de edição/formatação.
  • @A restringe entrada/apresentação a letras em contextos compatíveis.
  • Valide máscaras em telas traduzidas, pois tamanho e separadores podem variar.
COMMON PITFALLS
  • An incompatible mask may hide, truncate or display an incorrect value.
  • Old pictures may depend on the command or component used; validate in the current SmartClient/release.
  • Do not treat a visual mask as complete business validation.

Related content

REFERENCES
  1. Apostila ADVPL Introd. Microsiga Campinas, 2001. Documentação oficial histórica de caráter didático e de suporte. Conteúdo histórico, resumido, revisado e adaptado para guia de referência.
  2. TOTVS. Formatting and editing pictures in AdvPL. TDN.
Status
Published
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