# Using the Spec Data Design Data Builder

The Design Data Builder feature allows Spec Data Admins to create and manage *Spec Data* and *Test Definitions* using a UI that makes the process faster and less error-prone. If a Vault Admin has configured this feature and you have the proper [permissions][0], the Design Data Builder UI automatically appears when you create, edit, or view a *Spec Data* record. If you navigate away from the Design Data Builder UI for a given *Spec Data* and return later, the system returns you to the last element of the builder that you accessed.

If you attempt to open a *Spec Data* record that includes unsupported configuration, you receive an error dialog that allows you to download a CSV export of all the configuration errors.

## About the Design Data Builder UI

The Design Data Builder UI is split into a header, left panel, and right panel. The header lists the *Spec Data*'s *Name* and other metadata. The left panel shows a summary of the configurable items, and the right panel is where you navigate through and make changes to those items.

<a href="https://platform.veevavault.help/assets/images/spec-data-ui-25r3.png" data-lightbox="images" data-title="" data-alt="design Data Builder UI">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/spec-data-ui-25r3.png" alt="design Data Builder UI" style="max-width: 400px;"  />
</a>

### Header

The header includes the following metadata:

* **Name**: The *Spec Data*'s name. You can edit this field inline.
* **Lifecycle State**: A badge showing the current lifecycle state of the *Spec Data*.
* **In Progress Spec Executions**: The number of non-cancelled *Spec Executions* for this version of the *Spec Data*. You can click this number to open a list view of the *Spec Executions* in a new tab.
* **In Progress Change Analysis**: The number of in-progress Change Analyses for this *Spec Data*. This value can only be 0 or 1. You can click this number to open a list view of the Change Analysis in a new tab.
* **Effective Date**: 
    * If the record is superseded, this shows the *Previously Effective* date range.
    * If the record is not effective or superseded, this shows the date the record will be effective, if set.
    * If the record is effective, this shows the date it was made effective.
* **Sample Plan**: The *Sample Plan* associated with this *Spec Data* record. You can click this name to view the *Sample Plan* in a new browser tab. If there is not currently an associated *Sample Plan*, you can select one from within the Spec Data Builder.
* **Spec Data Type**: *Batch Release* or *Stability Study*. You cannot modify this field.
* **Samples to be Defined**: The total number of samples to be collected followed by the numbers of them that are In Process, Release, and Backup.

The header also includes a *Search* button. Click this button to open a dialog that allows you to search *Lab Sample Definitions* within the *Spec Data*.

### Left Panel

You can collapse or expand the left panel as desired. It lists the *Sample Types* and *Sample Definitions* as well as any [*Chart Definitions*](/en/lr/33542/). There is a collapsable section for every active *Sample Type* picklist value in the associated *Sample Plan*. Within each of those sections, *Sample Definitions* are displayed based on the *Sample Definition Order*, or alphabetically if no order is set. For each *Sample Definition*, the following fields are listed:

* *Sample Definition Name*
* *Sample Collection Count*
* *Amount*
* *Unit*

### Right Panel

The right panel is the main work area for configuring your *Spec Data*. In addition to the work area, this panel includes the *Next* and *Back* buttons for navigating between sections and the *Not Applicable* checkbox. This checkbox is not available for some required subsections. Checking this box deletes any configuration records in the current subsection and marks it as complete. If you configure something in that subsection later, the *Not Applicable* checkbox is automatically cleared. When you check *Not Applicable* for a *Sample Definition*, it also decrements the denominator for *Lab Samples Defined*.

Select a *Sample Definition* in the left panel to configure it in the right. After selecting a *Sample Definition*, the right panel shows a header containing the following:

* **Sample Definition Name**: Click this name to view the *Sample Definition* record details in a new browser tab
* **Sample Type**
* **Samples Defined**
* **Samples Remaining**

Below the header, the panel displays a circle for each of the *Samples Defined*. Select one or more consecutive circles to configure *Sample Actions* for their associated *Samples*. You can configure the following types of actions:

* **Test Action**: Available for any *Spec Data Type* and number of samples
* **Aliquot Action**: Available for any *Spec Data Type* but can only be configured for one sample at a time
* **Collect Action**: Only available for the *Stability Study Spec Data Type* and can only be configured for one sample at a time

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: You cannot directly create a <em>Select Action</em> using the Design Data Builder, but when you create a <em>Test Action</em> or <em>Aliquot Action</em>, the system automatically creates a <em>Select Action</em> alongside it.</p>
    </div>
  </div>
</div>



Select **Define Chart Definitions** under the *Chart Definitions* header in the left panel to create and configure [*Trend Chart Definitions*](/en/lr/33542/) in the right panel. You can create a new *Chart Definition* using the **+ Chart Definition** button in the upper left corner of the panel and edit or delete any existing *Chart Definitions* using the <a href="https://platform.veevavault.help/assets/images/lims-trend-chart-definition-2.png" data-lightbox="lims-trend-chart-definition-2.png" data-title="" data-alt="TXT">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/lims-trend-chart-definition-2.png" alt="TXT" style="max-width: 400px;"  />
</a> and <a href="https://platform.veevavault.help/assets/images/lims-trend-chart-definition-1.png" data-lightbox="lims-trend-chart-definition-1.png" data-title="" data-alt="TXT">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/lims-trend-chart-definition-1.png" alt="TXT" style="max-width: 400px;"  />
</a> icons in their respective collapsible sections.

<a href="https://platform.veevavault.help/assets/images/lims-trend-chart-definition-3.png" data-lightbox="lims-trend-chart-definition-3.png" data-title="" data-alt="TXT">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/lims-trend-chart-definition-3.png" alt="TXT" style="max-width: 400px;"  />
</a>

### Spec Data Builder Keyboard Shortcuts

You can use the following keyboard shortcuts to navigate the Spec Data Builder. When moving between elements using the keyboard, the focus cycles through UI elements in the following order: header, right panel, and left panel.

| **Action**                                          | **Windows Shortcut** | **Mac Shortcut**     |
| ----------------------------------------------- | ---------------- | ---------------- |
| Move to next element on screen                  | `<Tab>`            | `<Tab>`            |
| Move to previous element on screen              | `<Shift + Tab>`    | `<Shift + Tab>`    |
| Expand/collapse section, select focused element | `<Enter>` or `<Space>` | `<Enter>` or `<Space>` |
| Close, back                                     | `<Esc>`            | `<Esc>`            |

## Creating Spec Data Using the Design Data Builder

To begin the creation process, navigate to the *All Spec Data* view and complete the following steps:

1. Click **Create.** This opens a simplified version of the *Create Spec Data* dialog that does not include custom fields.
2. Enter a **Name**.
3. Select a **Sample Plan**. The *Sample Plan* you choose controls which *Sample Definitions* are available for this *Spec Data*.
4. Optional: Enter a **Description**.
5. Click **Save + Next**.
6. In the left panel, select a **Sample Definition**.
7. In the right panel, select one or more of the *Sample* circles to configure a *Sample Action*.
8. Click the button corresponding with the type of *Sample Action* you want to configure and complete the necessary steps. (See below.)
    1. **Assign Tests** (*Test Action*)
    2. **Perform Aliquots** (*Aliquot Action*)
    3. **Collect Samples** (*Collect Action*)
9. Repeat the above steps for each *Sample Definition* and *Sample*.

### Configuring a Test Action

In the *Tests to Execute* dialog, perform the following steps:

1. **Select Test Definitions**. You can search by *Name* or filter by columns to narrow the available list.
2. Click **Next**.
3. **Select Results**. There is a section for each *Test Definition* you selected. Select one or more *Results* for each *Test Definition*. You can search by *Name* or filter by columns to narrow the available list.
4. Click **Next**.
5. The right panel now shows a summary of the *Tests* to be assigned. For each Result, define at least one *Spec Data Criteria* by selecting an *Indication*, *Purpose*, and *Limit*.
6. Optional: If you need to edit a selected *Spec Data Criteria*, click **More Options (...) > Edit** inline to open a dialog where you can make your changes.
7. Optional: Click **+** to add another *Spec Data Criteria* or **Change Selection** to return to the previous dialog and add or remove *Test Definitions* or *Results*.
8. Optional: Click **More Options (…) > Edit Metadata** to open the *Sample Action* record in a new browser tab and edit its fields directly.
9. Click **Next**.

### Configuring an Aliquot Action

To configure an *Aliquot Action*:

1. Enter an **Aliquot Count**.
2. Click **Done**.
3. The right panel now shows a new circle for each planned *Aliquot Sample*. Assign *Sample Actions* to each *Aliquot Sample* using the same process as above.
4. Optional: If it is necessary to perform further *Aliquot Actions* on an *Aliquot Sample*, you can select the *Aliquot Sample*'s circle and click **Perform Aliquots** to configure further *Aliquots*.

### Configuring a Collect Action

To configure a *Collect Action*:

1. Enter a **Number of Samples.** The default value is 1.
2. Enter a **Planned Quantity**.
3. Enter a **Unit**.
4. Click **Next**.

## Required Permissions {#permissions}

To use the Spec Data Builder, you must have the following permissions:

* READ to the following objects
    * *Spec Data* object and *Spec Data* standard object type
    * *Sample Plan*
    * *Sample Definition*
* READ to the following fields
    * *Sample Plan* field on *Spec Data* object

[0]: #permissions