SX1 — Questions
Connects question groups to routine parameters.
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.)
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 NilCreates 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.
- 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.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.