Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

GETMV()

GetMV(cParametro) -> uValue

Reads a system parameter in branch context.

GETMV()AdvPL
01 · OVERVIEW

Overview

Reads SX6 for the connection branch. The reference describes help display when the parameter does not exist. The example prepares a block without automatically reading a potentially missing parameter. Return type follows the registered parameter. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

GetMV(cParametro) -> uValue

Parameters

cParametro
CharacterRequired

SX6 parameter name without branch.

Return value

Value according to parameter type.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed470()
    // Execute only in a prepared test environment.
    Local bRead := {|| GetMV("MV_DIAS")}
    ConOut(ValType(bRead))
Return Nil
Expected result

Prepares block B; reading depends on the environment and does not occur here. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Do not append branch to the parameter name. Check type before arithmetic or comparison.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. GETMV%28%29. TDN. 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