---
title: "Snippets Tab | ThreatConnect"
slug: "snippets-tab"
description: "This article describes the Snippets tab of the App Builder screen, including how to insert and create snippets and manage user-created snippets in an App project."
tags: ["Orchestration and Automation", "Developer Tools"]
updated: 2023-07-26T13:29:40Z
published: 2023-07-26T13:29:40Z
canonical: "knowledge.threatconnect.com/snippets-tab"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.threatconnect.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Snippets Tab

The **Snippets**tab contains small portions of code that can be inserted into a file in the [**Code Editor**](/v1/docs/code-editor)****with a single click. The available snippets are organized into groups in the **Snippets**tab, as in Figure 1, which displays several groups, with the **Metric**group expanded to show the snippets it contains.

![Table Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Figure%201_Snipperts%20Tab_7.2.0.png)

NoteYou can drag and drop this tab into a different area of the [**App Builder** screen](/v1/docs/the-app-builder-screen), if desired.

ImportantYou can add snippets only to Apps that use TcEx 4.0.*x*. If working with an App that uses a TcEx version older than 4.0.*x*, a message stating “Snippets not available for this version of TCEX” will be displayed in the **Snippets**tab.

Hovering over a snippet will display the **Insert Code![Icon Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Insert%20Code%20icon_App%20Builder.png)**icon to the right of the snippet. Hover over this icon to display a preview of the snippet’s code (Figure 2).

![Graphical user interface, text, application Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Figure%202_Snipperts%20Tab_7.2.0.png)

To insert a snippet into the **Code Editor**, position the cursor in the desired location in the **Code Editor**and click **Insert Code![Icon Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Insert%20Code%20icon_App%20Builder.png)**.

NoteYou can use your browser’s “undo” function (e.g., Command-Z) to remove a snippet that was erroneously inserted.

## Creating Snippets

To create your own groups and snippets, click **Add**![Icon Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Plus%20icon_Gray.png)at the upper-right corner of the **Snippets**tab. The **Create Snippet**window will be displayed (Figure 3).

![Graphical user interface, application Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Figure%203_Snipperts%20Tab_7.2.0.png)

- **Group**: Enter the name of the group. Entering the name of an existing group will insert the snippet in that group. Entering the name of a group that does not exist will create a new group into which the snippet will be inserted.
- **Name**: Enter a name for the snippet.
- **Snippet**: Enter the snippet’s code.
- Click the **SAVE**button.

## Managing User-Created Snippets

You may edit and delete snippets that you created. To access these operations, hover the cursor over the snippet. In addition to the **Insert Code![Icon Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Insert%20Code%20icon_App%20Builder.png)**icon, **Edit**![Icon Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Edit%20File%20icon_App%20Builder.png)and **Delete**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Delete%20File%20icon_App%20Builder.png)icons will be displayed (Figure 4).

![Table Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Figure%204_Snipperts%20Tab_7.2.0.png)

Click **Edit**![Icon Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Edit%20File%20icon_App%20Builder.png)to edit the snippet. The **Edit Snippet**window will be displayed (Figure 5).

![Graphical user interface, text, application, email Description automatically generated](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Figure%205_Snipperts%20Tab_7.2.0.png)

- **Group**: Click in the box to enter the name of a different group to which the snippet will be added. If the group already exists, its name will be displayed below the box as you enter text into the box. If the group does not exist, a new group will be created, and the snippet will be removed from its existing group and added to the new group after clicking the **SAVE**button.
- **Name**: Click in the box to modify the snippet’s name.
- **Snippet**: Click in the box to modify the snippet’s code.
- Click the **SAVE**button to save any changes to the snippet.

Click **Delete**![](https://cdn.document360.io/dfc206c8-1c9f-4725-b74d-a66f83432320/Images/Documentation/Delete%20File%20icon_App%20Builder.png)to delete the snippet. The **Delete Snippet**window will be displayed. Click the **DELETE**button to delete the snippet.

ImportantIf a group contains only one snippet and the snippet is moved to another group or deleted, then the group will be deleted automatically (i.e., a group must contain at least one snippet to exist).

---

*ThreatConnect® is a registered trademark of ThreatConnect, Inc.*

20084-09 v.07.B
