Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

MsgStatus / ClearStatus

MsgStatus(cExpressao); ClearStatus()

Shows and clears status text in the historical API.

MsgStatus / ClearStatusAdvPL
01 · OVERVIEW

Overview

MsgStatus takes status text and ClearStatus clears it. The eADVPL guide describes display without waiting for a user response. This is neither confirmation nor proof of background execution. This is a historical reference: availability and presentation depend on the client. The fragment prepares two blocks without requiring an active window during demonstration. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

MsgStatus(cExpressao); ClearStatus()

Parameters

cExpressao
CharacterRequired

Text shown by MsgStatus.

Return value

The guide specifies no useful return value; ClearStatus takes no parameters.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed544()
    // Caller must pair display and cleanup, including errors.
    Local bShow := {|cText| MsgStatus(cText)}
    Local bClear := {|| ClearStatus()}
    ConOut(ValType(bShow)+ValType(bClear))
Return Nil
Expected result

Prints BB. Uninvoked blocks do not change status. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Clear status on completion or failure. For UI-less jobs, record progress in appropriate logs. Do not hide an error by replacing it with status text.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. Guia de Referência eADVPL (histórico). §6.3–6.4. 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