Learn how to configure safety views for Workbench Reports.

About Safety Views

Safety views determine the reporting data for a Workbench Report. You can also use safety views to preconfigure Workbench Report parameters such as filters and field grouping. These parameters are applied to a Workbench Report when a user selects the safety view on the Workbench Report.

Safety Workbench includes the following safety views:

  • Principal Views: Contain the largest collection of data and preconfigured parameters. For example, a Principal View might include data for all Case versions. Vault derives all Workbench Views from a Principal View.
  • Workbench Views: Contain a subset of data from a specified Principal View and provide a more narrow and specific report analysis.

The following sections in this article describe the different sections of a safety view and how to complete them.

saf-workbench-view-1

saf-workbench-view-2

Create and Access Safety Views

To access a safety view, navigate to Business Admin > Objects > Workbench Views.

Select Create to create a new view. In the Create Workbench View window, specify the type of view you want to create and then select Continue.

Dependent Views

When creating a new Workbench View, this section appears only after saving.

A Workbench View is always dependent on another safety view, meaning it derives its data and configuration parameters from the specified safety view. The safety view on which the Workbench View is dependent is known as a dependent view. A dependent view can be a Principal View or another Workbench View.

As Principal Views are the basis for Workbench Views to add additional filters, Principal Views do not have any dependent views.

The safety view hierarchy starts with a Principal View, which leads into subsequent Workbench Views with a more specific data set. These Workbench Views can lead into other Workbench Views with even more specialized data sets.

saf-workbench-safety-view-hierarchy

Although a Workbench View may not always include a Principal View in the Dependent Views section, a Workbench View must ultimately be associated with one (1) unique Principal View through other dependent views. In the above example, Workbench View A.1/A.2 is not directly associated with the Principal View but is associated with it through Workbench View A.

Create a Dependent View

To add a dependent view:

  1. In the Dependent Views section of the safety view, select Create.
  2. In the Create Workbench View Dependent window, select a Dependent View.
  3. Select Save or Save + Create to add another dependent view.

Result

Vault adds the selected dependent view(s) to the Dependent Views section and generates a name for each.

The current view is now dependent on these selected safety views.

SQL Editor

SQL offers elaborate queries for parsing through data.

Your Veeva Representative provides and inputs them in the SQL Editor section. The queries are based on Amazon Redshift SQL, which is a subset of PostgreSQL 9.x. For more information on the available SQL functions, refer to Amazon Redshift and PostgreSQL.

The SQL query provides references for the fields specified in the safety view’s Workbench View Columns section. You cannot run a preview of the safety view unless the Workbench View Columns are populated according to the SQL.

The safety view can also access parameters of another safety view by referencing the safety view’s API name in the SQL Editor section. For example, select * from ${safety_view_api_name__c}. You must also create a dependent view for the safety view you are referencing.

Limitations

The following lists the safety view SQL limitations:

  • Vault does not perform any validation checks when inputting or saving the SQL. Issues are identified through a server error after running the preview.
  • Vault does not perform timeout checks when running SQL. Long-running queries will be terminated by Amazon Redshift. Related performance issues are identified through logged server errors.

Workbench View Objects

The Workbench View Column and the Workbench View Object sections both influence the Workbench Report layout. Where the Workbench View Columns define the fields users can add to the layout, the Workbench View Objects specify the fields you can group by on the Workbench Report layout. If you do not add Workbench View Objects to this safety view, grouping will not be available for Workbench Reports using this view.

The Workbench View Objects section consists of fields and one (1) parent object. The fields in this section correspond to the fields in the Workbench View Columns section.

Create Workbench View Objects

To create Workbench View Objects:

  1. In the Workbench View Objects section, select Create.
  2. In the Create Workbench View Object window, complete the following information:
    • Name: Enter the name of the field.
    • API Name: Enter the API name of the field. This value must end in __c.
    • Parent Object: Select the parent object from the drop-down or use the Advanced Search (binoculars-icon) icon to use filters and refine your search. Leave this field blank if you are creating the parent object.
  3. Select Save.
  4. Repeat the steps above to add additional fields.
  5. (Optional) To delete a field, select the Actions menu next to the field and then select Delete.

Grouping Criteria

Users can group fields on the Workbench Report layout by the fields you add to the Workbench View Objects section if the following criteria are met:

  • In the Workbench View Objects section, the field the user wants to group by is assigned to the parent object.
  • In the Workbench View Columns section:
    • For the field the user wants to group by, there is a corresponding field in the Workbench View Column section.
    • The field must be of the Object or Picklist column type.
    • The field’s Workbench View Object field must be set to the parent object.

Workbench View Columns

When creating a new safety view, this section appears only after saving.

The configuration you perform in a safety view’s Workbench View Columns section determines the fields you can add to the Workbench Report layout. Adding fields to the Workbench View Columns also makes them available for Workbench Report filters, if you are creating a Principal View.

The Workbench View Columns are also required for the safety view’s SQL to run successfully.

Supported field types include:

  • Picklist
  • Object
  • Text
  • Date and DateTime
  • Number
  • Yes/No

Create Workbench View Columns

To create the Workbench View Columns:

  1. In the Workbench View Columns section, select Create.
  2. In the Create Workbench View Column window, complete the following fields:
    • Name: Enter the name of the Workbench View Column. This value appears to users as a field in the Workbench Report layout.
    • API Name: Enter the API name of the Workbench View Column. This value must match the name of the column returned by the SQL query.
    • Column Type: Select a field type option from the drop-down.
  3. Select Save.
  4. Repeat the steps above to add additional columns.
  5. (Optional) To delete a field, select the Actions menu next to the field and then select Delete.

Filters

You can configure filters in the Filters section of the safety view. Filters you add to the safety view can also be used to generate an output when users run a Workbench Report.

You can add safety view filters only if the Workbench View Columns section is populated. To add safety view filters on a Workbench View, you must first define Workbench View Columns on the associated Principal View.

For more information, see Add Safety View Filters in Safety Workbench.

Run Preview

You can generate a preview of the safety view by selecting Run in the Run Preview section.

After you run the preview, Vault executes the SQL for this safety view and returns a list of up to 100 records. The output is displayed in a table format based on the Workbench View Columns’s column type. Optionally, you can select the column header to sort the records returned by the run preview.

If the SQL is invalid, the run times out after 60 seconds and Vault returns a server error.