How to optimize your workflow with row IDs in Baserow

Baserow keeps your data organized, but sometimes you need to dig a little deeper. That’s where row IDs come in. Row IDs are unique codes assigned to each record in your rows in a table. They offer a powerful way to manage, automate, and collaborate on your information.

This tutorial will cover how to optimize your workflow with row IDs in Baserow.

What we’ll do

In this tutorial, we’ll cover how to view and use these unique identifiers, unlocking powerful functionalities within your table. We’ll cover the following steps:

Prerequisites

To complete this tutorial, you’ll need the following:

Let’s explore how to do just that.

Make row IDs work for your workflow

1. Why row IDs are important

A row ID is a number that uniquely identifies that row of data. Note that, the row ID is not intended to count the number of rows in a table.

Unlike row count, which can change with sorting, row IDs are permanent and never deleted. When a row is deleted, the rows that remain are not renumbered. The assigned number is permanently attached to a row and cannot be changed or deleted, even after the row is deleted. The numbering may then have gaps as a result.

Here’s why row IDs might be useful:

  • Sharing specific data: Imagine you have a table with tons of information. Row IDs come in handy when you want to share a specific record. Instead of sending them the entire table and hoping they find the right data, you can simply share the row ID. It’s like giving them a direct link to that specific piece of information, saving you both time and frustration.
  • Automating workflows: Integrations and automation often rely on row IDs to identify and manipulate specific records.
  • Building formulas: Baserow’s powerhouse formulas can leverage row IDs for tasks like filtering or referencing related data.
  • Redirect to URL after form submission: Use {row_id} to include the newly created row id in the URL.
  • Troubleshooting: If you encounter an error in a specific record, the ID helps developers pinpoint the exact culprit.
  • Add data source in Application Builder: To dynamically input a row ID and retrieve a single row in a given table by its ID, add a page parameter to the page or add a user source.

Why are row IDs important in Baserow

The row ID is visible in the grid view. Note that, if you switch to a different view (like Kanban or Form), the row ID column will disappear. But they’re always there, ready to be revealed when you need them.

Let’s explore how this works in a table.

2. Set up a database from template

Log in to your existing Baserow account or create a new account if you don’t have one already.

Once you log in, you can access the dashboard to add workspaces and databases. You can work with an existing workspace, database, or table, set up a new workspace from scratch or choose a template from our template library.

If you’re just starting with Baserow, we recommend you read our support article on how to create a workspace and how to add collaborators to a workspace.

Let’s use the Project tracker template from the template library.

To add a template, click on the Use this template button to add the template to the workspace:

Use this template

Set up a database in Baserow from template

That’s it! we’ve successfully created a new database with tables. Now we can populate, manage, and organize data in Baserow.

3. Find the row ID in URL

Now let’s peek in the address bar. Enlarge a row in full view and look at your browser’s address bar. You’ll see a URL structure like https://baserow.io/database/www/table/xxxxx/yyyy/row/zz. The zz part is your coveted row ID!

Find the row ID in URL

Those long IDs in the website address (URL) can be hard to use. It would be easier to have the ID displayed directly within the table itself. We can do this by adding a formula field to the table.

4. Create a formula field to display row IDs

For easier access, you can add a dedicated field to display row IDs within your table. This formula field will automatically display the unique ID for each row, making it much easier to reference and manage your data.

  1. Add a formula field: Click the “+” icon next to your existing fields and choose “Formula” field type.
  2. Add row id function: In the formula bar, simply type row_id(). This formula automatically retrieves the unique ID for each record.
  3. Name and save: Give your new field a clear name like “Row ID” and click “Create field” to add it to your table.

Now, you’ll see a new column displaying each row’s unique ID.

Create a formula field to display row IDs

Summary

Using row IDs in Baserow takes your table to the next level. These unique identifiers for each row unlock a world of organization, automation, and efficiency. By understanding row IDs, you can manage your data with pinpoint accuracy and complete control, ultimately streamlining your workflow.

Other useful resources

The following articles may also be helpful:

In case you’ve run into an issue while following this tutorial, feel free to reach out to ask for help in the Baserow community.