# Create an IF text expression

In this video, you will learn:

• What the IF expression does
• How to use a IF text expression in a calculated field
Transcript
In this video, you’ll learn what the IF expression does and how to use an IF expression in a calculated field.
If expressions are one of the most powerful expressions you can use in a calculated field, it allows you to create new conditions based on your needs while still using all the information that’s gathered by Workfront.
It’s one way of getting a clear perception of the work being done in your organization.
The IF text expression allows you to compare, format and string together fields of data using a condition, a true value, and a false value. For example, if the project’s description field is blank, the calculated field should say, No Description.
However, if a description is found, the actual description should appear. This can be done with an IF text expression in a calculated field. The IF text expression includes the name of the expression, a condition, a true value, and a false value. Let’s go over each element of the IF text expression.
The condition is the requirement that has to be evaluated in order to determine whether the true or false value will appear. It’s the foundation of the expression. For example, is the project status equal to on hold or is the description field blank? Conditions are typically written using operators to qualify the condition. For example, if the project status is equal to on hold, the condition is {status}=ONH.
The equals sign is the operator that causes the condition. In this case, the condition only asks for one status to be looked at.
There are other operators that help in creating the needed conditions. Operators like greater than, does not, and et cetera.
In this example, this means if the percent complete is more than 50%, and in this example, this means if the priority does not equal high. You can also nest expressions within an expression.
In this case, the, is blank expression can be used as the condition to say if the description field is blank, whatever you use, once the condition is written, the expression must tell the system what to do if the condition is or is not met.
That’s where the true and false values come into play.
If the condition is met, the calculated field uses the true value to place information in the calculated field. For example, if the project status is equal to on hold then you want the calculated field to say inactive.
If the description field is blank, then the calculated field should say, No Description and be placed in the true value slot.
The last thing to enter is the false value.
This means if the condition is not met, what should go into the calculated field? What should be the false value if the project is any other status than on hold? In this example, you want to leave the field empty or left blank. To do that, you enter a quotation mark, a space and another quotation mark.
Now, technically the calculated field isn’t blank. There is a space between the quotation marks but that allows the field to appear blank.
In the description example, if there is a description for a project, the calculated field should show the actual description.
As always, when you’re done entering the elements of the expression, make sure to close it with a parenthesis.
Otherwise, you can’t save the expression and thereby the custom form.
After putting in the closing parenthesis and saving the field in the custom form, the calculated field can be viewed in the objects detail page or used in a report view.
IF expressions are one of the most powerful tools in your custom information built. It allows you to create conditions important to your needs using information already gathered by Workfront to enhance your understanding of the work being done. -
recommendation-more-help
c9fbcf61-6d19-481e-a9ab-f54a0ae0ee8a