Pictures and masks in AdvPL
PICTURE "@E 999,999.99" · "@!" · "@A"Masks control display, editing and formatting of values in visual commands and reports.
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.
Syntax
PICTURE "@E 999,999.99" · "@!" · "@A"Formatted numeric value
#Include "TOTVS.ch"
User Function ExPictureValor()
Local nTotal := 1520.75
MsgInfo(Transform(nTotal, "@E 999,999.99"), "Total")
ReturnThe mask controls numeric display with decimal places and separators.
Uppercase text
#Include "TOTVS.ch"
User Function ExPictureTexto()
Local cNome := "cliente teste"
MsgInfo(Transform(cNome, "@!"), "Nome")
ReturnThe @! picture is used to display content in uppercase.
- 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.
- 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.

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