Usina BRAdvPL Guide
Sign in
← All topics
FUNCTIONUnder review

Pergunte

Pergunte( <cGrupo>, [lPerg], [cTitulo], [lCanSave], [lUserSave] )

Displays parameterized questions registered in SX1.

QuestionsSX1ParametersInterface
01 · OVERVIEW

Overview

Pergunte() presents the user with a question group from the SX1 dictionary. It is common in reports and parameterized routines because it collects filters and options before the main execution.

02 · SYNTAX

Syntax

Pergunte( <cGrupo>, [lPerg], [cTitulo], [lCanSave], [lUserSave] )

Parameters

cGroup
CharacterRequired

Question group registered in SX1.

lAsk
LogicalOptional

Indicates whether the question screen should be displayed.

cTitle
CharacterOptional

Title shown in the question window.

lCanSave
LogicalOptional

Indicates whether parameters can be saved.

lUserSave
LogicalOptional

Indicates user-based saving.

03 · PRACTICAL EXAMPLE

Calling a question group

#Include "TOTVS.ch"

User Function ExPergunte()
    Local cGrupo := "ZZREL01"

    If Pergunte(cGrupo, .T., "Parâmetros do relatório")
        MsgInfo("Parâmetros confirmados.")
    EndIf
Return
Expected result

The routine presents the question group and continues when the user confirms.

BEST PRACTICES
  • Use quando a rotina depender de filtros ou opções informadas antes da execução.
  • Documente o grupo SX1 esperado junto à rotina.
  • Combine com leitura das variáveis geradas pelas perguntas conforme o padrão do relatório.

Related content

REFERENCES
  1. Help ADVPL.chm. Help AdvPL/APMSLib, documentação oficial histórica, 15 mar. 2004. Conteúdo resumido, reorganizado e marcado para revisão contra documentação atual da TOTVS quando disponível.
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