> For the complete documentation index, see [llms.txt](https://documentation.ocsinventory-ng.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ocsinventory-ng.org/administrator-docs/server-setup/customization/virtual-columns-and-layouts.md).

# Virtual columns and layouts

The asset list can be tailored in two complementary ways:

* **Virtual columns** add new columns to the asset list, filled with values coming from your templates.
* **Layouts** save a set of displayed columns (standard and virtual) under a name, so you can switch from one view to another in a click and share it with other users.

Both features are available from the toolbar above the asset list (**Inventory → Assets**).

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FE4x4NjGjfSpxOyt1n8bh%2Flayout_virt.png?alt=media&amp;token=a44d0747-b08d-4053-a824-772adc18de29" alt=""><figcaption></figcaption></figure>

## Virtual columns

### What is a virtual column?

Assets created from different templates rarely store the same information in the same place. The BIOS version, for instance, may be a field of the *Hardware* section in one template and of the *Firmware* section in another.

A virtual column gathers these fields under a single column name. For each template, you point at the field that holds the information; the asset list then shows, for every asset, the value of the field mapped for its template.

{% hint style="info" %}
A template that is not mapped in a virtual column simply shows an empty cell for its assets.
{% endhint %}

### Create a virtual column

1. Go to **Inventory → Assets**.
2. Click the **gear** button next to **Show / Hide**. The **Manage virtual columns** window opens.
3. Enter a **Column name** (e.g. `BIOS VERSION`).
4. Choose its **Visibility** (see [Visibility and sharing](#visibility-and-sharing)).
5. Map the column to a template:
   1. Select a **Template**.
   2. Select a **Section** of this template.
   3. Select the **Field** holding the information.
6. To cover more templates, click **+** (*Add a template*) and repeat step 5. Click the **trash** button to remove a line.
7. Click **Add**.

The asset list reloads and the new column appears.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FlrWuRS4SMBUNiaA575BG%2Fimage.png?alt=media&amp;token=4cab54e1-b78b-49a7-b267-4f0fc3d51c8d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Each template can only be mapped once in a virtual column: a template already used on a line is no longer offered on the others. At least one template must be fully mapped (template and field) before the column can be saved.
{% endhint %}

### Edit or delete a virtual column

The existing virtual columns are listed at the bottom of the **Manage virtual columns** window, with their name, the number of mapped templates and their visibility.

* Click the **pencil** button to load a column into the form, change its name, visibility or mapping, then click **Save**. Click **Cancel** to leave the edition without saving.
* Click the **trash** button to delete a column. It is removed from the asset list straight away.

Who can edit or delete a column is described in Visibility and sharing.

### Use a virtual column in the asset list

A virtual column behaves like any other column of the asset list:

* it can be shown or hidden from the **Show / Hide** menu,
* it is included in the **CSV export**, under its column name,
* it can be saved in a layout.

***

## Layouts

### What is a layout?

By default, the columns you show or hide from **Show / Hide** are remembered in your browser only. A layout saves this choice on the server, under a name: the displayed columns **and their order**.

Layouts let you:

* keep several views of the asset list (e.g. *Support view*, *Hardware audit*, *Licensing*) and switch between them,
* find the same view on any browser or computer,
* share a view with your groups or with every user.

The **Layout** selector sits in the asset list toolbar, before **Show / Hide**.

### Apply a layout

Pick a layout in the **Layout** selector. The asset list displays its columns, in the saved order; every other column is hidden.

Select **No layout** to go back to your own Show / Hide choices.

{% hint style="info" %}
The selected layout is remembered by your browser: it is applied again the next time you open the asset list.
{% endhint %}

### Create a layout

1. Use **Show / Hide** to display the columns you want, in the order you want.
2. Click the **Save as new layout** button next to the **Layout** selector.
3. Enter a **Layout name** (e.g. `Support view`).
4. Choose its **Visibility** (see [Visibility and sharing](#visibility-and-sharing)).
5. Check the list of columns that will be saved, then click **Add**.

The new layout is created and selected right away.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FriPG3NaM6qCt8TQOkKSc%2Fimage.png?alt=media&amp;token=73344ef2-b085-4167-a214-8e535bcb9818" alt=""><figcaption></figcaption></figure>

### Update the columns of a layout

While a layout is selected, the changes you make with **Show / Hide** are **not saved automatically**. They only apply to your current display until you save them:

1. Select the layout.
2. Show or hide columns from **Show / Hide**.
3. Click the **Save the layout** (floppy disk) button. It is only enabled when the displayed columns differ from the saved ones.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2FtlJkeQ819zclv9K1xHbb%2Fsave_layout.png?alt=media&amp;token=cb289deb-4ff1-4190-a2e9-38ce233b7054" alt="" width="358"><figcaption></figcaption></figure>

To discard your changes, select the layout again or switch to another one.

### Rename, share or delete a layout

With a layout selected:

* Click the **pencil** button to change its name, visibility, groups or group permission, then click **Save**. The columns are not changed from this window: use the **Save the layout** button for that.
* Click the **trash** button and confirm to delete it. The asset list goes back to your own Show / Hide choices.

<figure><img src="https://461838061-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtjrEC8kt8LJiJYFBs5CS%2Fuploads%2Fx7ZKxzcGi6VNyaYhEn2i%2Flayout.png?alt=media&amp;token=84864775-46cd-48b4-bedc-feb3835ce37b" alt="" width="358"><figcaption></figcaption></figure>

### Layouts and virtual columns

A layout can contain virtual columns. When a layout is shared, some users may not have access to all of its virtual columns (a private virtual column, for instance):

* these columns are simply skipped for them;
* if they save the layout, the columns they cannot see are **kept** in it, so the layout stays complete for the other users.

A column removed after the layout was saved is skipped as well.

{% hint style="info" %}
When several authors have created layouts, the author's name is shown next to the layout name in the selector, to tell apart two layouts with the same name.
{% endhint %}

***

## Visibility and sharing

Virtual columns and layouts share the same visibility options:

| Visibility    | Who can see and use it                                 |
| ------------- | ------------------------------------------------------ |
| **Private**   | Only its author.                                       |
| **My groups** | Its author and the members of the selected **Groups**. |
| **Public**    | Every user.                                            |

With **My groups**, the **Allow modification by groups** option lets the members of the selected groups edit the item as well.

| Action | Author | Member of a selected group                 | Other users         |
| ------ | ------ | ------------------------------------------ | ------------------- |
| Use    | Yes    | Yes (*My groups* or *Public*)              | Yes (*Public* only) |
| Edit   | Yes    | Only with **Allow modification by groups** | No                  |
| Delete | Yes    | No                                         | No                  |

{% hint style="warning" %}
Only the author can delete a virtual column or a layout.
{% endhint %}

***

## Permissions

Access to both features also depends on the permissions of the user's group:

| Permission                             | Effect                                                                               |
| -------------------------------------- | ------------------------------------------------------------------------------------ |
| **Virtual columns** – add              | Shows the **gear** button to manage virtual columns.                                 |
| **Virtual columns - Layouts** – view   | Shows the **Layout** selector.                                                       |
| **Virtual columns - Layouts** – add    | Shows the **Save as new layout** button.                                             |
| **Virtual columns - Layouts** – change | Shows the **Save the layout** and **pencil** buttons (on layouts the user may edit). |
| **Virtual columns - Layouts** – delete | Shows the **trash** button (on layouts the user authored).                           |

Users who cannot manage virtual columns still see the virtual columns shared with them in the asset list.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://documentation.ocsinventory-ng.org/administrator-docs/server-setup/customization/virtual-columns-and-layouts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
