SHOW operator
The SHOW operator creates an action that opens a form in interactive view.
Syntax
SHOW [formId =] target
[formActionOptions]
[{initActionOperator}]
Where target is one of two forms — the named-form opens a previously declared form:
formName [OBJECTS objName1 = expr1 [NULL], ..., objNameN = exprN [NULL]]
and the class-form opens the list or edit form of a class:
classFormType className = expr [NULL]
And formActionOptions is any combination of the following options, in any order:
FILTERS filterExpr1, ..., filterExprM
syncType
windowType
manageSessionType
sessionScopeType
cancelType
READONLY
CHECK
Where windowType is one of:
FLOAT
DOCKED
EMBEDDED
POPUP
IN containerName
Description
The SHOW operator creates an action that opens the specified form. The OBJECTS block sets initial values for the form's objects (in the class-form, the single = expr plays the same role for the form's only object, which is implicitly named object and can be referenced by that name inside FILTERS expressions). Inside formActionOptions, the FILTERS clause attaches additional filters computed from the calling context; the remaining options control the form-opening behavior — flow, layout, session, system-action visibility, and other modifiers. The trailing block {initActionOperator} runs once when the form is opened.
Parameters
-
formIdString literal that uniquely identifies the opened form instance for later form-management actions (for example, to close that exact form). By default, the opened form has no such identifier.
-
formNameForm name. Composite ID.
-
classFormTypeType of the class form to open. It is specified by one of the keywords:
LIST— the selection (list) formEDIT— the editing form
-
classNameName of the custom class whose list or edit form is opened. Composite ID.
-
objName1, ..., objNameNNames of form objects for which initial values are specified. Simple IDs.
-
expr,expr1, ..., exprNExpressions whose values are used as the initial values of the corresponding form objects.
-
NULLafter the initial valueKeyword. Allows the passed initial value to be
NULL. By default, if any passed value isNULL, the action is skipped and control passes to the next action. -
initActionOperatorContext-dependent action operator that runs on form opening, after the form's
EVENTS ON INIThandlers.
Options
-
filterExpr1, ..., filterExprMNon-empty list of expressions that define additional filters applied to the form. Each expression can use both the calling context parameters and the form's own objects.
-
syncTypeThe flow-control mode. One of:
WAIT— synchronous (wait for the form to close)NOWAIT— asynchronous (continue immediately after opening)
By default, the platform picks
WAITwhen the call is itself made from a modal form, when more session usages will follow in the same call, or when the chosen window-type is itself modal (FLOAT,EMBEDDED,POPUP); otherwiseNOWAIT. -
windowTypeThe form layout:
FLOATshows the form as a floating window,DOCKEDas a tab in the system forms window,EMBEDDEDandPOPUPas in-place editors, andINplaces the form insidecontainerName— a form-qualified design component (the form's name followed by the component's path within that form's design) that must be a container. By default,FLOATis used in synchronous mode andDOCKEDin asynchronous mode. -
manageSessionTypeOverrides whether the opened form is the session owner. One of:
MANAGESESSION— force ownershipNOMANAGESESSION— force non-ownership
By default, the form is the session owner only if the session has no other owner at opening time.
-
sessionScopeTypeThe session in which the form is opened. One of:
NEWSESSION— a new top-level sessionNESTEDSESSION— a new nested sessionTHISSESSION— the current session (default)
-
cancelTypeOverrides whether the Cancel system action (
System.formCancel[]) is shown on the form. One of:CANCEL— force visibleNOCANCEL— force hidden
By default, it is shown if the form is the session owner and the form contains actions that can change the session.
-
READONLYKeyword. If specified, the form is opened in read-only mode.
-
CHECKKeyword. If specified, when the user presses the OK system action (
System.formOk[]), the platform first validates the pending session changes (runs the apply pass — constraints, aggregations, event handlers — without committing); the form closes only if the validation passes, otherwise it stays open.
Examples
date = DATA DATE (Order);
FORM showForm
OBJECTS dateFrom = DATE, dateTo = DATE PANEL
PROPERTIES VALUE(dateFrom), VALUE(dateTo)
OBJECTS o = Order
FILTERS date(o) >= dateFrom, date(o) <= dateTo
;
testShow () {
// initial values for two objects, init action after opening
SHOW showForm OBJECTS dateFrom = 2010_01_01, dateTo = 2010_12_31 { MESSAGE 'On init'; };
// open in a new session as a floating window, with the new object as the current one
NEWSESSION {
NEW s = Sku {
SHOW sku OBJECTS s = s FLOAT;
}
}
// open the named form with panel values, an additional filter, and an instance identifier
SHOW 'recentOrders' = showForm OBJECTS dateFrom = 2024_01_01, dateTo = 2024_12_31 FILTERS number(o) > 1000 NOWAIT;
// open the list form of the Sku class, focused on a specific sku
NEW s = Sku { SHOW LIST Sku = s; }
}