Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

FWLeUserlg

FWLeUserlg(cCampo, nOpcao)

Interprets stored USERLGI/USERLGA information.

FWLeUserlgAdvPL
01 · OVERVIEW

Overview

TOTVS Support clarifies this reads stored audit-field content rather than the logged-in user. The alias must be correctly positioned and the advised use is in a virtual field. During insertion there may be no stored content yet. The example wraps the documented read without querying actual data or generalizing undocumented return options. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

FWLeUserlg(cCampo, nOpcao)

Parameters

cCampo
CharacterRequired

USERLGI/USERLGA field name in the positioned context.

nOpcao
NumericRequired

Option 1 observed in the official example; other options not detailed here.

Return value

Stored field information under option and position; no fixed value.

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed434()
    // Evaluate only in a virtual field with the alias correctly positioned.
    Local bRead := {|| FWLeUserlg("A1_USERLGI",1)}
Return Nil
Expected result

Prepared block; no user or record queried. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check context and return before integration; the example does not replace a complete routine.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. Função FWLeUserlg. Central de Atendimento, atualizado em 2026. 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