-

How to Build a Simple System on Drupal for Equipment List with Company Assets?

In this article, I’ll show you how to build a system to keep track of your company assets using Drupal. This system allows you to easily create and manage an equipment list with resources such as laptops, phones, monitors, or desks that are assigned to employees. It’s ideal for remote or hybrid companies, where control over issued equipment is crucial. Read the blog post or watch an episode of the “Nowoczesny Drupal” series (the video is in Polish).

Why implement a system for the equipment list?

Companies, especially those that use hybrid or remote work or have multiple offices, need to manage business assets. When employees are assigned different equipment, over time, it can be difficult to keep track of who has what devices, what has been returned, and what needs to be replaced. With a Drupal-based system, we can easily monitor each employee's inventory and identify which equipment is unassigned and can be reused.

It is also worth mentioning that this system can be built as a standalone Drupal installation, or such functionality can be added to an existing system, such as part of a company's intranet system.  

Let's now move on to a step-by-step explanation of how to build such a system using Drupal as an example.

Creating data types in Drupal

We'll start by creating the data types that will further be necessary to create the views of equipment records.

Equipment types and parameters

To begin with, you need to create the types of data that will be stored in the system. Drupal makes it easy to define different types of equipment, such as laptops, phones, or monitors. We can also assign appropriate parameters, such as RAM or screen size.

The creation of data types is done through the "Structure" tab in the Drupal admin panel. We create the equipment type as a taxonomy and the equipment parameters as further taxonomy terms that can be assigned to equipment.

Creating data types in Drupal for building a company's equipment list.


Examples of equipment types:

  • Laptop
  • Phone
  • Monitor
Equipment types defined in Drupal to create an inventory with the business assets in the system.


The second thing we’re going to specify are the parameters of the equipment. Examples of the parameters we use are:

  • RAM
  • Monitor size
RAM is an example of a hardware parameter added to a company asset inventory in Drupal.


The next step will be to add an item that will determine the above parameters, such as the size of the monitor (13 inches and 16 inches) or the size of the RAM (16 GB and 32 GB). To do this, we expand our list by adding more partitions.

A view of hardware parameters in Drupal with information such as monitor size and RAM.


Next, we sort our items so that the appropriate parameters are under the appropriate data categories.

An example of sorting equipment parameters in Drupal for an inventory of business assets.


This allows you to accurately describe each piece of equipment and organize all the information.

Creating equipment entities

The next step is to create an entity that will store all the information about the equipment. In Drupal, we create a new content type - "Equipment".

Adding the ‘Equipment’ content type in Drupal for future company equipment records.


Then, in the "Manage fields" section, we click "Create a new field" and select the type of field we want to add. For parameters, we refer to the things we added earlier, that is, we add a "Reference" field to the equipment type and its parameters.


It’s important to change the allowed number of values in the parameter reference to "unlimited". This will allow you to add more than one parameter (e.g., RAM, screen size) to a given hardware.

Creating a ‘Parameters’ element in Drupal for company equipment list.


Similarly, we’ll create a "User" field. 

We can add several fields to this entity, such as:

  • Equipment name - text field
  • Type of equipment (laptop, monitor, phone) - reference field
  • Parameters (RAM, screen size) - reference field
  • Assigned user - reference field
  • Serial number - numeric field
  • Purchase date - a field with a date
  • Purchase price - numeric field + suffix
  • Invoice (possibility to attach PDF file or photo) - file upload type field

These fields can be added as needed as text, numeric, file upload, and date fields, as seen with the specific examples above. You can also use suffixes (e.g., adding PLN in the field with price) and several other additional specifications.

Here you can immediately see how many types of fields there are to use in Drupal for different data structures or types of content, and how quickly they’re built. Each of these fields can be customized to meet the specific needs of the company, making the system more flexible.

After creating such structures, we see a form with data to be filled in.


Create views to manage equipment and business assets

To make the form display aesthetically pleasing, we need to improve it by creating views.

Categorization of information

Our form has several types of data that we can group. We’ll create three groups of equipment data:

  • General (name, type of equipment, user)
  • Financial (price, invoice, date of purchase)
  • Other (parameters, serial number)

Once saved, we’ve categorized data, making the form more readable. You can also customize these fields according to the needs we have in the company.

View of the form with grouped categories for the equipment type in the inventory in Drupal.


Now, we’ll make one more modification - we’ll change the field for selecting the type of equipment to select2, which will allow us to choose the types of equipment our company has listed earlier. 

Changing the field for selecting equipment type to select2 in the equipment list on Drupal.


This gives us an interesting drop-down list that will allow us to easily select types of equipment, not only by clicking but also by typing by name, which is useful, especially when there are a lot of them.

View of the drop-down list with equipment types showing laptop, monitor, and phone.


Another modification will be to change the field in "Parameters." We’ll replace the autocomplete with a field of type Hierarchical select.

Changing the field in the parameters to Hierarchical Select to easily choose the item.


This will give us the ability to select the type of parameter with a value assigned to it accordingly.

Example of a parameter view in a form for creating equipment records in Drupal.


You can see here that you can modify these widgets freely, even after creating them, gaining a convenient interface for managing hardware data.

After filling in the fields and saving the data, the view of each equipment will contain the following columns:

  • Equipment ID
  • Name
  • Type of equipment
  • Parameters
  • Purchase price
  • Edit option
  • Assigned user

This gives the person managing the list of equipment a complete overview of available resources and can easily add new company assets or edit existing data if necessary.

Views of business assets

Now, we’ll work on equipment views.

We’ll go to "Structures" and then click "Views." We’ll add a name, which is "Equipment." We’ll change the content to "Equipment," go to "Page Settings" and click "Create Page." We add a title, path, number of elements to display, and save. Now in the "Format" section, we change the display of elements to "Table."


In it, we’ll add some fields, such as ID, equipment type, parameters, price, and link to edit. I leave the rest of the options as default, but of course, you can edit it as you like. 

The next step is to set the order of the data in the table, we want to have the ID and equipment type at the beginning and the edit option at the end. In this step, we also add a link to add new equipment (as a header) and full sorting. We get such a user-friendly view:

A table with the order of items set to make the equipment list clear and easy to edit.


As we can see, Drupal allows advanced personalization of equipment addition forms, making it much easier for users and data entry becomes more clear and organized.

Filtering and sorting data of the equipment list

We’ll now add a data filtering option. To do this, we’ll go to the filtering configuration option and add criteria - “Filter by name.”

Adding company filtering of data by item name in the equipment inventory.


Next, we’ll look at adding the ability to sort the data by specific criteria, e.g., by price, ID, and name. This can be done in the display method settings:

Setting the display method with the option to sort data by price, ID, or name.


As a result, table headings have become clickable, making it possible to sort them ascending or descending:

Viewing of the equipment inventory with the option to sort elements in the table.


This allows the user to easily search for equipment by name, price, or other parameters. Introducing the possibility of sorting columns (e.g., by price or purchase date) significantly improves the convenience of using the system.

Create advanced views of the equipment list

Drupal allows you to further develop the system by creating more advanced views, such as:

  • Equipment not assigned to the user - the view allows you to identify business assets available for release.
  • Equipment without invoices - a list of equipment that lacks attached invoices, which can help you organize your documentation.
  • Equipment with the parameters we specify.

To do this, copy the current view and rename it, for example, to “unassigned equipment.” Then, we add a filter to the "user" field and set it as empty. This gives us an easy view of the equipment, which is in the company and not assigned to anyone.

So we have two views:

Setting up equipment and unassigned equipment to make it easier to control company assets.


Thanks to Drupal's flexibility, it can be cloned at will, changing settings and creating further views, such as equipment without invoices or with specific parameters to suit the needs of the company or individual departments, such as IT administration or accounting.

Equipment list with company assets - summary

Setting up a company's equipment inventory system on Drupal is a task that can be done relatively quickly and without a lot of expense. Drupal offers tremendous possibilities for tailoring the data structure and functionality of the system to the specific needs of the organization. With simple tools such as content types, views, and advanced forms, we can build a system that streamlines the management of resources in a company.

Eventually, such a system can also be integrated with other applications, exposing data in JSON format or importing it from CSV files. All this makes Drupal an excellent choice for companies that want to keep effective records of equipment.

If you're wondering if Drupal is the right technology for your business, it's a good idea to schedule a free consultation, to discuss possible solutions.

-