When designing your screens, you can create an action that is executed before the screen is rendered. This action is called the Screen Preparation.
Typically, this action includes setting values to variables and fetching data from the database, i.e., all the logic executed before the screen is displayed.
The Screen Preparation is designed with the Action Flow editor by simply dragging tools from the Action Flow Toolbox into the action flow.
In Web Screens, the Screen Preparation is executed in one of two situations:
The screen is loaded:
An entry point, by typing the URL in the browser;
A , , destination element in an action flow;
In case a screen is redrawn, there may be some logic that does not need to be re-executed (like queries) because elements in the scope keep their values. In this case use the IsLoadingScreen built-in function to only execute the logic that is really necessary for redrawing.
This section does not apply to SMS screens as they are always loaded.
In most cases, the screen preparation action flow has only one End element, but there may be more than one End element.
In case you want to redirect to a different screen, use the Destination element instead of the End element.
When editing expressions in the flow of a screen preparation, the following elements are in the scope:
The elements that are in scope are listed in the Scope Tree of the Expression Editor or in the Variables Tree of the Select Variable window.
The Screen Preparation is automatically executed before the screen is rendered. Therefore, you don't have to explicitly invoke it.
However, the Screen Preparation may have a different behavior if you are using Ajax to refresh parts of the Screen.
In this case, if the Screen Action to refresh parts of the Screen ends with an End element:
About Actions | Create a Screen Action | Action Flow Editor