Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

PUTMV()

PutMV(cParametro,xConteudo,[lErro])

Updates an existing SX6 parameter.

PUTMV()AdvPL
01 · OVERVIEW

Overview

TDN states that PutMV uses the connection branch and expects an existing parameter; the branch is not appended to its name. The third argument controls error presentation when an exclusive-access issue prevents updating. The community example shows PutMV and PutMvFil, but production settings should not be modified for demonstration. This uninvoked block uses a fictional parameter to be created and tested in a sandbox. (Sources: refs. 1–2.)

02 · SYNTAX

Syntax

PutMV(cParametro,xConteudo,[lErro])

Parameters

cParametro
CharacterRequired

Existing SX6 name without branch.

xConteudo
Parameter-definedRequired

Value matching SX6 definition.

lErro
LogicalOptional

Shows error when .T., documented default; .F. returns failure without that presentation.

Return value

TDN documents .F. on failure; community example describes .T. on success.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed608()
    // MV_X_ED608 must exist in the sandbox; block not invoked.
    Local bUpdate := {|xValue| PutMV("MV_X_ED608",xValue,.F.)}
    ConOut(ValType(bUpdate))
Return Nil
Expected result

Creates block B; neither changes SX6 nor creates the parameter. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check type, branch, permission, exclusive access and business effects. Never log sensitive parameter values.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. PutMV. TDN. Accessed on 2026-10-27.
  2. Atilio. dan-atilio/AdvPL. Maratona de Exemplos/Exemplo_396_Funcoes_PutMV_e_PutMvFil.prw. Arquivo completo consultado; adaptação editorial. 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