Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

VAZIO()

Vazio() -> lEmpty

Checks empty content in the current validation context.

VAZIO()AdvPL
01 · OVERVIEW

Overview

TDN documents parameterless Vazio: it checks the current variable/positioned field and returns logical. It differs from Empty(xValue), which takes an explicit value. Implicit context matters; an isolated call does not select a desired field. The official example uses !Vazio() in MSGET VALID. This block only prepares validation without showing UI or changing a field. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

Vazio() -> lEmpty

Return value

Logical: .T. empty, .F. nonempty.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed706()
    // Bind only to the correct field’s VALID context.
    Local bNotEmpty := {|| !Vazio()}
    ConOut(ValType(bNotEmpty))
Return Nil
Expected result

Creates block B without evaluating field content. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Do not confuse required content with format, key-existence or authorization rules.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. VAZIO. Contexto e retorno. Accessed on 2026-10-28.
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