Create LEFT / RIGHT expressions

In this video, you will learn:

  • What the LEFT / RIGHT expression does
  • How to use a LEFT / RIGHT text expression in a calculated field
Transcript
In this video, you’ll learn what the LEFT and RIGHT text expressions do and how to use a LEFT and RIGHT text expression in a calculated field.
The LEFT and RIGHT text expressions allow you to take a certain number of characters from either the left or the right side of a field. And it’s often used to condense information in a report. Let’s look at what we can do with the expressions.
No matter which one you use, either the LEFT or the RIGHT text expression, they both include the name of the expression, the data point or string, and the number of characters you would like to include from either the left or right side of the data point or string.
For example, you want to add the last two digits of the year the project was entered into the system to the Unique Project ID calculated field already created in Workfront.
That can be done by using the RIGHT text expression and the entryDate field. Place the entryDate field as the data point or string. Next, tell the system how many characters from the right that you would like to pull into the calculated field from the entryDate.
In this case, we want to pull the last two characters, which would be the last two digits of the year. So your expression will look like this.
Now, if we wanted to create this field on its own, we would just see this.
That isn’t particularly helpful. So we’re going to embed the RIGHT text expression into the Unique Project ID calculated field so the year is included.
To do that, click the Unique Project ID field in the custom form.
Go to the Calculation box and either copy and paste the RIGHT text expression into the expression already there, or if you haven’t written it out already, go ahead and type the RIGHT text expression directly into the existing expression.
In this example, the year is going to be placed at the beginning of the Unique Project ID.
Note, it’s recommended that you include spaces and dashes between each piece of information in the Unique ID field making it more legible.
That’s done by entering open quotation marks, a space, a dash, another space, and an ending quotation mark.
That way, your Unique Project ID number will look like this instead of this.
It’s a matter of preference. Either will work.
Once the RIGHT text expression is added, the whole expression should look something like this.
If everything looks good and you don’t receive a message saying the expression is written incorrectly, click Save and Close.
After saving the field and the custom form, the calculated field can be viewed in the object’s detail page or used in a report view. -
recommendation-more-help
c9fbcf61-6d19-481e-a9ab-f54a0ae0ee8a