Usina BRAdvPL Guide
Sign in
← All topics
FOUNDATIONUnder review

SX1 — Questions

Connects question groups to routine parameters.

SX1 — QuestionsAdvPL
01 · OVERVIEW

Overview

SX1 stores question metadata. Pergunte initializes MV_PARxx and may display editing; confirmation and later answer use belong to the caller flow. This differs from SX6 system parameters. The official article documents Pergunte(cGroup,[lPerg],[cTitle]) with a logical return. The example prepares a fictional group without opening a screen. Calling another group requires preserving caller answers rather than blindly overwriting private variables. (Sources: refs. 1–3.)

03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed681()
    // Fictional group: configure and validate before invoking.
    Local bAsk := {|| Pergunte("ED681",.T.,"Example parameters")}
    ConOut(ValType(bAsk))
Return Nil
Expected result

Creates block B without loading answers or changing SX1. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Handle cancellation and validate answer types/ranges before processing. Do not edit SX1 directly as a deployment shortcut.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. Dicionário de Dados: tabelas, funções e usos. Accessed on 2026-10-28.
  2. TOTVS. Qual função permite acessar e editar grupo de perguntas SX1 — Pergunte. Accessed on 2026-10-28.
  3. Atilio. dan-atilio/AdvPL. Maratona de Exemplos/Exemplo_249_Classe_FWSX1Util.prw. Arquivo completo consultado; adaptação editorial. Accessed on 2026-10-28.
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