How to add 2 strings together in Notion? | Use of add operator in Notion

How to add 2 strings together in Notion

Today we are going to learn how to add 2 strings together in Notion.

Combining 2 strings together in Notion is a really simple task. This can be accomplished with the use of add operator in Notion.

Let’s begin…

In order to find the average of numbers in 1 database, we will follow a 3-step approach as follows:

  1. We need to create a database to hold the data to find the combination of 2 strings.
  2. Set up the database correctly.
  3. Put the desired formula that will help us find the combination of 2 strings.

How to create a database in Notion? (Step:1)

Before creating a database, let’s first understand what is a database.

What is a database?

Database in Notion

In Notion, a database is a collection of data that can be structured and organized in a variety of ways. It’s a powerful feature that allows users to create custom databases to store, manage, and track information in a structured and organized manner.

A Notion database is made up of a collection of properties that define the different types of data that can be stored within it.

These properties can include text, numbers, dates, formulas, attachments, checkboxes, and more.

Databases in Notion can be customized to suit a variety of needs, including:

  • project management,
  • task tracking,
  • inventory management,
  • customer relationship management, and more.

They can be organized into tables and viewed in a variety of formats, including:

  • lists,
  • galleries,
  • calendars, and
  • Kanban boards.

Overall, databases in Notion provide a flexible and powerful way to organize and manage information, making it a popular tool for individuals and teams across a wide range of industries and use cases.

How to create a database in Notion?

How to add a database in Notion

In order to add a database in Notion, simply type “/database” and you will get a list of options for adding a database in Notion.

Select “Database – Inline” and you can add a database to your Notion page quickly.

Next, we will set up the database correctly to find the combination of 2 strings.

Setting up the database correctly (Step:2)

In any database that you ever create, there will always be a default property which is the first column of the database. This property will always have the “Type” as “Title” which can’t be changed.

In this example, we are combining the First Name and the Last Name together as an exercise to combine 2 strings together.

Here’s what we will require in our database to find the combination of 2 strings in a database:

  1. First Name (Title / Text Property)
  2. Last Name (Text Property)
  3. Combination of First and Last Name (Formula Property)

How to add the properties in a database in Notion?

In order to add properties in a database in Notion, click on the “+” symbol at the top right end of a database.

Once selected, you will get a list of options to choose from to select the property type. Select the “Text” property and name it “Last Name”. Now we have the First Name (string) and the Last Name (string) set up in the database. 

Note: The First Name is the first column of the database, which is the default property that is created when we create a new database.

Now the next step is to find the combination of both strings in the database with the use of a formula.

Here, we are going to use 2 different formulas to find the combination of 2 strings in Notion. Add 2 more properties and set the property type as “Formula” as shown below.

Finding the combination of 2 strings in Notion (Step:3)

Once our database is set up, we need to figure out which formula to use to find the combination of 2 strings in Notion.

Simply add all strings together in Notion (Formula: 1)

This is a basic formula that essentially works on the following logic:

“Add all the strings together with the use of the “+” sign ”

Here’s the first formula we are going to use to find the combination of 2 strings using Notion:

prop("First Name") + " " + prop("Last Name")

You can copy + paste the following code (formula:1) onto your Notion workspace to find the combination of 2 strings…

prop(“String 1″) + ” ” + prop(“String 2”)

Note: Here the addition of “ “ in between the 2 strings helps to insert a space in between 2 strings before combining both.

Use of add function to find the combination of strings in Notion (Formula: 2)

The second formula will also work on the same logic of finding the sum of all the strings.

For finding the combination of both strings, Notion has another built-in operator to help us find the sum of numbers, i.e. add().

Add operator in Notion

Essentially, add() function helps to add 2 strings and combines them together and it can also be used to add numbers as well.

Important: add() will take 2 parameters inside and will give the output.

Eg:

  1. add (1,3) = 4
  2. add (“I love”, “Notion”) = “I love Notion”

Now in order to add the 2 strings together, i.e. First Name and Last Name, we would use the following formula:

add(prop("First Name"), add(" ", prop("Last Name")))

Note: Here the addition of “ “ in between the 2 strings helps to insert a space in between 2 strings before combining both.

You can copy + paste the following code (formula:2) onto your Notion workspace to find the combination of 2 strings…

add(prop(“String 1”), add(“ “, prop(“String 2”)))

Summary

Here’s what we learned about finding the combination of 2 strings in Notion. We have used 2 formulas to find the combination of 2 strings in a database.

  1. prop(“String 1″) + ” ” + prop(“String 2”)
  2. add(prop(“String 1”), add(“ “, prop(“String 2”)))

Leave a Comment