# Node Operations

In this section, we'll learn about the features that are specifically used for building the node structure.

## 1. Add Node

New nodes can be added to the model, one node at a time or as multiple nodes at one instance. We'll first learn how to add a single node and then move on to adding multiple nodes.&#x20;

### 1.1. Adding a Single Node

Next to every node, you can find a few icons and menu options. **Add Child Node** and **Add Sibling Node** are the options that help in adding new child nodes or sibling nodes respectively. **Add Child Node**<img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2F0FGC2CGzL3RktwQOSjIM%2Fimage.png?alt=media&#x26;token=d78f04c9-66da-49e0-a25c-d41d91540fcb" alt="" data-size="line"> is the first option next to the node name and **Add Sibling Node** ![](https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FJ1BIX9Z27r8GMTId6BLo%2Fimage.png?alt=media\&token=7344dba0-409c-474c-99d6-98bc5396d9cc)  is available on the three dots menu (click on the three dots to access the menu).

Adding a sibling node adds a separate new node at the same level as the original node and not as a dependent.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FnZiXAcya93CT3WLzWbFM%2Fimage.png?alt=media&#x26;token=cc2e094e-93e0-42bb-ab5a-d3ca2bf074a0" alt=""><figcaption><p><strong>Add Child and Add Sibling options</strong></p></figcaption></figure>

{% hint style="info" %}
**Note:** By default, new child nodes are added to the top node if the user does not select any node to add them to.
{% endhint %}

### 1.2. Adding Multiple Nodes

To add multiple new nodes to the model, click **Add New Node** on the toolbar. There are 4 different ways of adding multiple nodes - **Text, Data,** **Add Node using Template,** and **Constant Node.**

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2F3EkxBlX9brQPO7uiYI2G%2Fimage.png?alt=media&#x26;token=12c1c97c-b3e2-4478-80b5-b4ac2eebbf58" alt=""><figcaption><p><strong>Add New Node</strong></p></figcaption></figure>

#### **Text**

It is used to manually enter the node names that need to be added to the model.&#x20;

1. Select the node to which you want to add new nodes.
2. Navigate to **Add New Node** **-> Text** to open the **Add Nodes by Name** pop-up.&#x20;
3. In the text box, enter the name of the nodes you want to add.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2Fs5bqdNRJUbNUzqa0cQCh%2Fadd%20nodes.png?alt=media&#x26;token=7054e085-7665-4608-acad-f220c99e2e98" alt="" width="375"><figcaption><p><strong>Add Nodes by Name</strong></p></figcaption></figure>

4. To create a hierarchy, use the Tab key to insert child nodes.&#x20;
5. After entering the node names choose whether you want to add them as a child or as a sibling.
6. Click **Add** to add the nodes to the model.

#### **Data**

This option is used when you want to create nodes that have data source values. These nodes are also referred to as dynamic children as the child nodes are created to the top node dynamically.

1. Select the node to which you want to add new nodes.
2. Navigate to **Add New Node->Data** to open the **Add Nodes from Data** pop-up.
3. A list of source keys is displayed in a hierarchy as per the categories assigned to the visual.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FLePVgATCuncxDwkKjcaX%2Fdata%20s%20node.png?alt=media&#x26;token=116ff3f1-57a8-41c8-a573-2e02ae76a23e" alt="" width="375"><figcaption><p><strong>Add Nodes from Data</strong></p></figcaption></figure>

4. Select the source key which you want to add to the model.
5. The selected source key's data source values are displayed as **Preview** at the bottom for all the data series (see the dropdown list in the image).

{% hint style="info" %}
In case the selected source key has children, all the descendant source keys will also be added as nodes in the same hierarchy.
{% endhint %}

6. After selecting the source key, you have the option to add the new nodes as a child or as a sibling.
7. Click **Apply** to add the nodes to the model.

#### **Add Node using Template**

Another way of adding new nodes is by using the template feature. After creating a template structure in the desired manner (Click [here](https://docs.valq.com/templates#create-new-template) to learn about creating templates) you can add the template anywhere on the model.

1. Select the node to which you want to add new nodes.
2. Navigate to **Add New Node->Add Node using Template** to open the **Add Node from Template** pop-up.
3. In case there is no available template, you will be prompted to create a new template.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FibxPwWKcFTwqLByUEvFh%2F2023-07-31_10h28_38.png?alt=media&#x26;token=0d347749-0550-42c8-869c-392bfeefe691" alt="" width="375"><figcaption><p>C<strong>reate New Template</strong> </p></figcaption></figure>

4. When there is an available template, the **Add Node from Template** pop-up is displayed. Select the template you want to add and the source key for which you want the template to fetch the values.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FgPp8J7YI82zpMN4yK4OH%2FAdd_Node_From_Template.png?alt=media&#x26;token=1ac5fb96-8bc9-4ccd-a5be-dc419806fba4" alt="" width="375"><figcaption><p><strong>Add Node from Template</strong></p></figcaption></figure>

5. After selecting the source key, choose whether you want to add them as children or as siblings.
6. Click **Preview** to view the changes and then add the nodes to the model.

{% hint style="info" %}
Parent nodes of leaf nodes are only available for selection in the **Add Node from Template** dialog box while the leaf nodes become the template keys.
{% endhint %}

### 1.3. Adding a Constant Node

A constant node is a node that has a single value for its periods as well as the total. To add a constant node to your model,&#x20;

1. Select the node to which you want to add a new constant node.
2. Navigate to **Add New Node->Constant Node** to open the **Add Constant Node** pop-up.
3. Enter the name of the constant node and choose whether you want it to be added as a child or a sibling node.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FJo5h3mVNRF0zhHIf3PSN%2FAdd%20Constant%20Node.png?alt=media&#x26;token=dc050155-a50f-4d7b-9aa9-02361905ef00" alt="" width="375"><figcaption><p><strong>Add Constant Node</strong></p></figcaption></figure>

4. Click **Add**.
5. **Time aggregation** and **adding child nodes** are **not applicable** for constant nodes.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FJeZ1ZWYeaxXKLiBszFkE%2Fimage.png?alt=media&#x26;token=72db75df-dde1-4b33-ad8c-245c19fe5c7a" alt=""><figcaption><p><strong>Time aggregation and dependents - not applicable for Constant node</strong></p></figcaption></figure>

{% hint style="info" %}
The new node created through the above ways will copy all the properties except the Type and Configuration of the node to which it was added.&#x20;
{% endhint %}

## 2. Group Node

A group node is a node that is used as a title or header inside the model and it doesn't hold any value. They are used to provide context and improve the design of the model. Group nodes can be used to group multiple nodes under a common label/ title.

To add a Group node, click the 3 dots beside the node name and select **Add Group**.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FlnAdQyuL6qH9j5onXFim%2Fimage.png?alt=media&#x26;token=43c89c1d-0c98-45c0-a542-6ac5ebf7c246" alt=""><figcaption><p><strong>Add Group</strong></p></figcaption></figure>

A Group node is created and named as *New Group(1)* by defaul&#x74;*.* You can rename the group node name accordingly.

You can now add new child nodes under this group node as explained [here](#1.-add-node) or [move ](#5.-move-node)the existing nodes within this group.&#x20;

In the below image, you can see that the group node is renamed to *Income Statement* and the 'Net Income' node is moved within that group.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2F0YJaRolYr53UpCcRMKuX%2Fimage.png?alt=media&#x26;token=bcbf7e56-5061-4865-8270-1acb5eb85df2" alt="" width="563"><figcaption><p><strong>Group Node -</strong> <strong>Example</strong></p></figcaption></figure>

In the Simulate tab, it is shown with the group node icon as below.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FSPGVFUPBYhqKdKXu8cA0%2Fimage.png?alt=media&#x26;token=f7ef652e-e050-49e0-8d60-a2540e7b0b05" alt=""><figcaption><p><strong>Group Nodes</strong></p></figcaption></figure>

## 3. Duplicate Node

Hover over the node that you want to duplicate and select **Duplicate** from the options under the 3 dots. This will duplicate all the properties of the selected node including the Type and configuration of the node.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FpYsXkbEqfUrsomVFLv1h%2Fimage.png?alt=media&#x26;token=709ea2db-e1e1-469e-bac3-7849d0812592" alt="" width="563"><figcaption><p><strong>Duplicate Node</strong></p></figcaption></figure>

## 4. Rename Node

To rename, double-click on the node you want to rename and enter the new name.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FGKXAz0GkP3qED3cZmJMr%2Fimage.png?alt=media&#x26;token=91a979d2-c968-4228-9e6d-84f85b91857d" alt="" width="563"><figcaption><p><strong>Rename Node</strong></p></figcaption></figure>

## 5. Move Node

To relocate a node to a different place in the model, hover over the node you want to move and choose **Move** **To** from the 3 dots menu.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2F9B9OnRlgmYFtQViJTfTX%2Fimage.png?alt=media&#x26;token=8c3b04fa-7c1b-45da-ba6b-d4f6defe46bf" alt="" width="563"><figcaption><p><strong>Move Node</strong></p></figcaption></figure>

From the pop-up, choose the node under which you want to move the node and click **OK**.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FchqhdLm2oQfMKVse540i%2FSelect%20node%20to%20move%20to.png?alt=media&#x26;token=03bfed06-cec4-473d-95d8-2c692e093199" alt="" width="375"><figcaption><p><strong>Select a node to move to</strong></p></figcaption></figure>

The node is now moved to the selected node as its first child.

## 6. Edit Node

Editing a node consists of updating any of the node's settings. To edit a node, click the pencil icon next to the node name or select the node and click **Edit Node** on the toolbar. Each of the node properties is explained in detail in the section [Node Settings.](https://docs.valq.com/model/node-settings)

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FYfgScnW17eVTvJvDnydL%2Fimage.png?alt=media&#x26;token=bf9c28bc-0fa7-49c4-b3a8-24c50ffeb5bb" alt=""><figcaption><p><strong>Edit Node</strong></p></figcaption></figure>

## 7. Re-order Node

The position of the nodes can be re-ordered through the drag-and-drop feature. The re-order icon  <img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FXZ4J28AO9XGWojTuFG80%2Fimage.png?alt=media&#x26;token=9fa2fee9-948e-457a-9d7c-41a51295e6ad" alt="" data-size="line"> before the node name can be used to re-order the child nodes within a parent or move them to another parent.

Hover over the node and click on the icon. Now drag it to the desired position and drop it.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2Fj6IteW7uHATbr3vXRF7r%2Fimage.png?alt=media&#x26;token=dbb90cf9-f396-48e9-97c8-13a5cee422dd" alt="" width="563"><figcaption><p><strong>Re-order Node</strong></p></figcaption></figure>

{% hint style="info" %}
When you drag & drop a parent node, all the descendants of it will also be moved to the new location.
{% endhint %}

## 8. Bulk Editor

Bulk Select is a model editing tool that enables us to perform an action on multiple nodes in one go. The actions that can be performed under Bulk Select are editing node settings, and moving and deleting nodes.&#x20;

To select the nodes that need to be edited, click **Bulk Select** on the toolbar and then select all the nodes that need to be edited.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FUvDDTIlxii5hAvcwFFIk%2Fimage.png?alt=media&#x26;token=7896597d-6d2d-4aa7-97b7-ed654004d747" alt=""><figcaption><p><strong>Bulk Select</strong></p></figcaption></figure>

Another way to select nodes would be from the dropdown on the checkbox in the header. The dropdown has options such as All Nodes, Leaf Nodes and Filtered Nodes.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FEsWI7xOVWEIivmAwF4rC%2Fimage.png?alt=media&#x26;token=c69123bd-7a82-4e0f-ad03-f07846ccf90a" alt=""><figcaption><p><strong>Bulk Select dropdown option</strong></p></figcaption></figure>

**Edit node settings:** Select the **Bulk Editor** button from the black color menu at the bottom of the screen.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FkhEiHU06hueIOLxEiDLb%2Fimage.png?alt=media&#x26;token=c70db8b8-f9f5-454b-8c8e-0796ed3a8fb7" alt=""><figcaption><p><strong>Select Bulk Editor</strong></p></figcaption></figure>

This will open the list of properties that can be updated. Make the necessary changes in the popup and click **Apply** to update all the selected nodes.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2Fz9YwCNIyY1mr6JOulS0m%2FBulk%20Editor.png?alt=media&#x26;token=4b215892-7b96-47f5-93d6-cc1df3fafad1" alt=""><figcaption><p><strong>Bulk Editor</strong></p></figcaption></figure>

**Move nodes:** Select the **Move To** button from the black color menu at the bottom of the screen.&#x20;

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2Fvdfmg4jhYKpVLNDTy9bF%2Fimage.png?alt=media&#x26;token=df407a66-ec1e-4802-9e65-5dae94eb9005" alt=""><figcaption><p><strong>Move Nodes</strong></p></figcaption></figure>

This will open the node selection popup where you can select the node under which you want to move the selected nodes and click **OK**.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FchqhdLm2oQfMKVse540i%2FSelect%20node%20to%20move%20to.png?alt=media&#x26;token=03bfed06-cec4-473d-95d8-2c692e093199" alt="" width="375"><figcaption><p><strong>Select a node to move all the nodes</strong></p></figcaption></figure>

**Delete nodes:** Select the **Delete** button from the black color menu at the bottom of the screen to delete all the selected nodes.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FHgdXwtekUZhULAYSBL4D%2Fimage.png?alt=media&#x26;token=d031a8f4-8ce1-487e-a793-64dcf2dafa9c" alt=""><figcaption><p><strong>Delete nodes at once</strong></p></figcaption></figure>

## 9. Delete Node

Click the Bin icon <img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FZnYoITizQyqdgp5FyKsM%2Fimage.png?alt=media&#x26;token=2b7e792c-30fe-4e4a-aec8-bd9f88c54a4c" alt="" data-size="line">  next to the node name to delete a node and its dependents.

<figure><img src="https://261229348-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmXNCTvPRjJZj6UunHBgb%2Fuploads%2FnxTtwBe6QCLu3ZIKuWdX%2Fimage.png?alt=media&#x26;token=afe1275c-78c9-437d-9e09-ed80684ee88e" alt="" width="563"><figcaption><p><strong>Delete Node</strong></p></figcaption></figure>
