Confirmation Pages

In 2020 R2, we added VBScript support for implementing custom confirmation pages. Confirmation pages are custom dialog boxes which are triggered at certain points of a workflow, as part of a wizard, or as part of a command. There are multiple events that can be used to trigger a confirmation page. See examples of how confirmation pages can be implemented in our KnowledgeBase.

This topic describes the purpose of confirmation pages, their benefits and limitations, and provides a simplified script sequence to demonstrate where in a script confirmation pages can be triggered. In this topic you can also find the VBScript events that support confirmation pages, the properties and methods you can use to build confirmation pages, and how to add confirmation pages to your VBScript.

Learn more about creating and editing event procedures.

ClosedBackground

When a user executes an operation in Meridian, it may be necessary to gather input or show information about the item being processed. What input is needed or what information should be shown can depend on the metadata of the item, and complex logic can be involved in making the decision. In PowerUser, the WinMsgBox and WinInputBox functions are available to ask input or show information at any point during the script execution.

In PowerWeb, the Meridian script is executed on the web server. Due to the nature of web applications, it is not possible to trigger a window to display in the browser from a script executing on the server. To address this, the Confirmation Page functionality has been added as an alternative to the WinMsgBox and WinInputBox functions.

Confirmation pages offer more user interface customization options than WinMsgBox and WinInputBox. There are more options for input fields and multiple inputs can be combined in a single page. This simplifies the data collection process.

However, there are limitations to when confirmation pages can be triggered. Displaying a window and gathering user input requires a round trip between the server and the browser. To initiate this process, additional events—events with the prefix Pre—have been added. You can use the handlers for these events to control the display of input fields.

After processing the script, the browser will show a confirmation page. The user will view the information and enter the required data. Their input is then posted back to the server and can be read using script functions in the next event.

ClosedSimplified Script Sequence

The numbered list below describes the general sequence of events for confirmation pages in VBScript. This sequence can vary depending on the event type, and whether the confirmation page is part of a wizard.

The general sequence is:

  1. The user selects a batch of items.

  2. The user executes a command.

  3. The PreInitialize event fires.

    • This occurs once for the entire batch.

    • Script logic can be added to this event to show information or gather input applicable to the entire batch.

  4. The Confirmation Page for batch initialization is shown.

  5. The Initialize event fires.

    • This occurs once for the entire batch.

    • In this event, the captured user input can be used to control the script processing. Often the input will be stored in global variables for use in later events.

  6. The PreBefore event fires.

    • This occurs for each item selected by the user.

    • Script logic can be added to this event to show information or gather input applicable to the item being processed.

  7. The Confirmation Page for the item is shown.

  8. The Before event fired.

    • This occurs for each item selected by the user.

    • In this event, the captured user input can be used to control the script processing for the item being processed.

  9. The actual operation is executed.

  10. The After event is fired.

    • Script logic can be added to this event to show information applicable to the item that was processed.

  11. If configured, an Information Page can be shown for the item.

  12. The Terminate event is fired.

    • This occurs once for the entire batch.

    • Script logic can be added to this event to show information applicable to the entire batch; however, you cannot make changes to the batch at this time.

  13. If configured, an Information Page can be shown for the batch termination.

    • This occurs once for the entire batch.

    • Only summary information is shown—it is not possible to gather user input in this page.

ClosedSupported Events

The following VBScript events support confirmation pages.

Supported VBScript Events

Event Type

Event

Description

Custom

PreExecute

Used to add a confirmation page before a custom command has been executed.

Custom

PreInitialize

Used to add a confirmation page before a custom command is initialized.

Custom

Terminate

Occurs after the command has executed. This event does not support making changes to the batch, but you can use it to display information about the batch.

Document Copy / Move

PreBeforeCopyWithReferences

Occurs before the BeforeCopyWithReferences event. This event is used to add a confirmation page before the Copy with References Wizard.

Document Copy / Move

PreInitializeCopy

Used to add a confirmation page before the InitializeCopy event. This event can be used as part of a wizard.

Document Copy / Move

PreBeforeCopy

Used to add a confirmation page before the BeforeCopy event. This event can be used as part of a wizard.

PreBeforeCopy is not called when executing Copy with References. Copy with References will call PreBeforeCopyWithReferences.

Document Copy / Move

TerminateCopy

Occurs when a copy event is terminated. Applies only to Copy and Paste commands. This event does not support making changes to the batch, but you can use it to display information about the batch.

Document Generic

PreInitializeChangeDocumentType

Used to add a confirmation page before the InitializeChangeDocumentType event. This event can be used as part of a wizard.

Document Generic

PreBeforeChangeDocumentType

Used to add a confirmation page before the BeforeChangeDocumentType event. This event can be used as part of a wizard.

Document Project Copy

PreInitializeReleaseToMaster

Used to add a confirmation page before the InitializeReleaseToMaster event. This event can be used as part of a wizard.

Document Project Copy

PreBeforeReleaseToMaster

Used to add a confirmation page before the BeforeReleaseToMaster event. This event can be used as part of a wizard.

Document Workflow

PreBeforeRevokeWF

Occurs when a document type workflow is revoked by a user. This event is used to add a confirmation page before the revoke a document workflow action.

Document Workflow

PreInitializeRevokeWF

Occurs when a document type workflow is revoked by a user. This event is used to add a confirmation page before initializing the action.

Document Workflow

TerminateRevokeWF

Occurs when a document type workflow is revoked by a user. This event does not support making changes to the batch, but you can use it to display information about the batch.

Workflow Definition

PreInitializeExecuteTransition

Occurs at batch-level, before a workflow transition is initialized. This event can be used to add a confirmation page before initializing the transition.

Workflow Definition

InitializeExecuteTransition

Occurs at batch-level, when a workflow transition is initialized. This event applies the parameters specified in the confirmation page for the batch.

Workflow Definition

PreBeforeExecuteTransition

Occurs at document-level, before a workflow transition is executed. This event can be used to add a confirmation page for an individual document, before initializing the transition. The document name is visible to the user.

Workflow Definition

BeforeExecuteTransition

Occurs at document-level, when a workflow transition is executed. This event applies the parameters specified in the confirmation page for the document.

Workflow Definition

AfterExecuteTransition

Occurs at document-level, after a workflow transition is executed. Any changes to the event parameters are ignored.

Workflow Definition

TerminateExecuteTransition

Occurs at document-level and ends the execution of the workflow transition. Any changes to the event parameters are ignored. This event does not support making changes to the batch, but you can use it to display information about the batch.

ClosedRelevant Properties and Methods

The following properties and methods are used with confirmation pages. The Confirmation method is used to trigger the confirmation page, while the rest of the properties and methods are used to configure the layout of the confirmation page.

The properties and methods used to format the confirmation page are displayed from top to bottom in the confirmation dialog according to the order in which they are called in the script.

Properties and methods usable in confirmation pages

Object

Type

Name

Purpose

Description

Batch

Property

ConfirmationTitle

Formatting

Allows you to set the title of the confirmation dialog box.

Batch

Method

Confirmation

Trigger

The method used to call your custom confirmation page.

Batch

Method

AskConfirmation

Formatting

Allows you to add Yes and No buttons to the confirmation page.

Batch

Method

AskInput

Formatting

Allows you to add an editable text field to the confirmation page.

Batch

Method

ShowInfo

Formatting

Allows you to add static text to the confirmation page.

ClosedProcedures

You can add confirmation pages by using the VBScript Editor. For most confirmation pages, you will use the editor which is accessible from the toolbar at the top of the Configurator.

However, for custom commands, you also have the option to add confirmation pages to the script you created for the command. There is no functional difference between adding confirmation pages for custom commands to the VBScript editor or to the command script itself.

ClosedAdd Confirmation Pages to VBScript

To add confirmation pages to a command or wizard:

  1. In Configurator, click the Edit Events button An icon depicting a pencil and paper. in the toolbar at the top of the screen.

    The VBScript Editor opens.

  2. Enter your custom script.

    Learn more about creating and editing event procedures.

    The contents of the confirmation dialog will be ordered from top to bottom according to the order in which they are called in the script.

  3. Click OK.

ClosedAdd Confirmation Pages to Custom Command record

To add confirmation pages to an individual custom command record:

  1. In Configurator, expand Commands in the configuration tree to display the existing commands.

  2. Select the command you want to configure.

  3. Click Edit.

    For other configuration options for custom commands, see Create And Edit Custom Commands.

  4. Click the Meridian Enterprise Script Editor button A small gray button that has a pen and paper on it. to build a VBScript expression.

    The VBScript editor opens.

  5. Enter your script into the editor.

    Learn more about creating and editing event procedures.

    The contents of the confirmation dialog will be ordered from top to bottom according to the order in which they are called in the script.

  6. Click OK.

  7. Click Apply.

2023