String Functions 101

Today, we began exploring calculated fields and all the functions that we may use in our daily lives. String functions were my main focus, which was brand new to me as I only have ever used to the number functions. Today, I will be making a quick guide on what some string functions do with examples of when you will use them along with their syntax.

STARTSWITH, ENDSWITH & CONTAINS:

You can use these functions to group depending on placement of characters within the string or even containing them. In this example, I am grouping sub categories of products sold depending on the first letter of the sub category.

Grouping using STARTSWITH function

UPPER, LOWER & PROPER:

UPPER and LOWER is used to change the casing of characters in a string however, proper changes the first letter of each word to uppercase. In this example, I am using proper to capitalize the first letter of each word in the groups I have formed above.

Capitalizing the first letter of each word using PROPER

FIND:

Using the FIND function can be used in many ways. One way I utilized it was to find the space between the first name and last name from the customer name field.

Using FIND to find the space between first and last name

LEFT, RIGHT & MID:

You can use the above functions, depending on which direction you want to start counting the characters from, to separate strings in a field. For example, I want the function to return the first name from customer name. This is following on from using the FIND function.

Returns left of the space using LEFT and FIND

LEN:

This function returns the length of a string or the number of characters within a string. I found this function a bit difficult to use as I could not think of any situation where I would apply this function but the example below is a great way to use it. Using the LEN function to return the last name from customer name.

Using RIGHT, LEN and FIND to return the last name from customer name

REPLACE:

This function can be used to change the name of any records within a field, for this instance, I changed furniture to other within the category field.

Using REPLACE to change furniture to other

TRIM, LTRIM & RTRIM:

TRIM removes any spaces from the field from both sides whereas, LTRIM and RTRIM are only acting in one direction. In this example, I use TRIM to remove spaces from both sides of the email address field.

Using TRIM to remove space from email address field

SPLIT:

If you only want a certain amount of characters from a string, you can use the SPLIT function. Here, I use it to return only the first three characters from the product ID field.#

Using SPLIT to return only some characters from product ID
Author:
Reshika Chilakapati
Powered by The Information Lab
1st Floor, 25 Watling Street, London, EC4M 9BR
Subscribe
to our Newsletter
Get the lastest news about The Data School and application tips
Subscribe now
© 2025 The Information Lab