Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

FORMBATCH()

FormBatch( cTitulo, aTexto, aBotoes, [bValid], [nAltura], [nLargura] )

Displays messages and actions in a legacy window.

FORMBATCH()AdvPL
01 · OVERVIEW

Overview

FormBatch accepts title, text lines and buttons structured as type/enabled/block. Documentation describes a numeric option return; the public example also tracks choice through callback variables without using the function return. Its line/button-limit comments are not promoted to a general contract. This adaptation has one line and one cancellation button calling FechaBatch without reading files or starting imports. It requires Protheus interface context. (TOTVS, n.d., ref. 1)

02 · SYNTAX

Syntax

FormBatch( cTitulo, aTexto, aBotoes, [bValid], [nAltura], [nLargura] )

Parameters

cTitulo
CharacterRequired

Window title.

aTexto
ArrayRequired

Message lines.

aBotoes
ArrayRequired

Type, enabled flag and block per button.

bValid
Code blockOptional

Window validation.

nAltura
NumericOptional

Pixel height.

nLargura
NumericOptional

Pixel width.

Return value

The page describes an option number; this example does not use it.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed389()
    Local aText := {"Demonstration without processing"}
    Local aButtons := {{2, .T., {|| FechaBatch()}}}
    // Interface only: the callback closes the window.
    FormBatch("Editorial example", aText, aButtons)
Return Nil
Expected result

Window with a message and cancellation, without business processing. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Verify callbacks and closure in the release; visual choice is not write confirmation.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. FORMBATCH(). TDN. Accessed on 2026-10-26.
  2. EURAI. ADVPL/Funcoes/Mensagens/FORMBATCH.PRW. universo_do_desenvolvedor_site, commit a5c83e9490302bdb4a0fc5a9d92c2d569a60773c. Exemplo analisado. Accessed on 2026-10-26.
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