A Preview is special Layout Template designed to represent an Object in the most convenient and fastest way, to give a chance in a single glance to overview the Object. The Solution Builder allows defining multiple Previews for a single Object Type (e.g. Configuration Item). In this case, on run-time the System analyzes the parameters of the interactive user and the configuration settings of all available Previews for the selected Object, and, in the end, displays the Preview which fits the most for the current user. Contrary to the Dialog layout, although the Preview has a lot in common with it, the Preview represents data only in read-only mode, and always has only one Layout View. The screenshot below shows a sample Preview of a Software Product Object, which been opened on clicking on grid record:
Defining a Preview
To manage Previews open in Administration, under User Interface > Layouts, the Previews area.
Section defines the kind of Object Type the Preview is created for. The System handles to work with two principally different sources of Object Types.
- Configuration Item source refers to Schema definitions of the Configuration Items. The full data model of the Object is decoratively defined in Configuration Item. On selecting this option the System asks to pick one of the known CI.
- Web Service option refers to Object Types brought to the System by the registered RESTful Services. If the Web Service defines all HTTP Methods for CRUD operations (like GET, POST, PUT, DELETE), then the Solution Builder able to treat this Service as Object Type source, and use the code class contract of the Service GET operation, as the description of the Object Type. When this option is selected for Preview, the System analyzes the all registered Web Services in the Solution Builder, and propose to choose in drop down, only those which could serve as Object Type. As an example of usage this option, see Preview definition for Configuration Item, or Data Definition.
The set of settings regulates how and where the Preview is designed to be shown.
- Enabled, activates the Preview to be shown.
- Hide Header, determines if it is needed to hide an item's name in the header section.
- Applications, defines the list of UUX applications where the Preview is restricted to be shown. If no Application is picked, then the Preview is available in all Applications.This option allows to setup a few Previews for the same Object, and show one of them in specific Application (e.g. show restricted Object Details for Portal Users), and another for the rest of Applications.
- Priority, arbitrary integer value, which setup the order of the Preview in a procedure of determining the right Preview to display. In most of the cases, this property plays no role, and can be omitted. But there are cases, when for the same Object Type are defined, and after applying all possible filters to identify the available preview for the Current user, like checking the Audience, filter by Application, etc, there is still ambiguity and a few Previews definitions fits all filtering criteria, only in this case the Priority value is evaluated, and the Preview with the highest value will be displayed to the end-user.
The section allows extends or re-define the default security model which is used by the System for making a decision whether to show the Object at all or which Preview needs to be displayed.
"Available regardless from the Configuration Item permissions", allows to neglect the Permissions defined for Configuration Item, and to see Preview even when none of the Role current user is a member of, has a Read permissions for the Configuration Item. It can be used in Portal, where User is allowed to see his own Objects (like Incident, Orders), but not allowed to see Objects he has no relations to.
"Available only for Objects with valid ASQL Expression", provides a possibility to define additional security check to detect the visibility of the Preview. The ASQL expression is applied to the selected Object CI Data Definition.
The example below demonstrates how the Preview for the Incident objects could be restricted to anyone except the Initiator of the Incident
RelatedSPSActivityClassBase.Initiator = CurrentUserId()
For more details see chapter Preview Security
The System gives a possibility to configure the Context help article, which will be accessible either from the Preview menu, or on F2 hotkey. Solution Builder allows to refer either the internal Knowledgebase Article as a Help Article for Preview or define the external link.
Design Preview Layout
The same as for any other Layout Template available in Solution Builder to design the appearance of the Preview, run action "Customize" for the Preview object, to open the Layout Designer. Layout Designer restricts the Authors of Preview, to create additional Layout View, and by default, does not allow Input controls, on the rest, no limitations.
The Solution Builder uses a complex algorithm to dynamically identify whether the interactive user is allowed to see Object details at all, and if yes, then what exactly Preview needs to be displayed. The diagram below, in general, depicts the flow of defining the action on user request to see Object details:
To configure Security for Preview, you have the following options:
1. "Set Audience" action. Setups audience of people who allowed to see the Preview
2. Setup Permissions for appropriate Configuration Item. If the Configuration Item is not allowed to Read for the current user, and Preview does not configured to ignore CI permissions, the Preview is not allowed.