Learn the data expression structure

In this video, you will learn:

  • The standard elements used when building expressions in Workfront
Transcript
In this video, you’ll learn the standard elements used when building expressions in Workfront. With all the data expressions that can be built in Workfront, it’s key to remember that no matter what kind of expression you create, there are always fundamental elements that must be included for that expression, whether simple or complex, to work. Those elements are expression name and open and close parenthesis, the data points or strings with curly brackets and camel case, and commas. With the elements laid out as follows.
The name of the expression tells the system how to treat the data points or strings being used for the expression. For example, we want to subtract one field from another, combine multiple pieces of information to provide quick insight, or use company specific verbiage in a field or report if certain criteria are met. Every expression created must include the name of the expression, which is found at the beginning. For instance, SUB is the name of the expression in this example, and therefore goes at the beginning of the expression being built.
Or in this example, despite the names and characters included, you know the name of the expression being used is IF, because it’s at the beginning.
After the name of the expression, there’s always an opening parenthesis and a closing parenthesis.
The opening parenthesis is always placed after the name of the expression.
For example, WEKDAYDIFF, open parenthesis, and then the rest of the expression information follows.
Where multiple expressions are being used or nested, the open parenthesis can help locate and clarify what expressions are being used and when. For example, this is a more complex expression to create a unique project identification number that includes the year the project was created, the person who created it, and the reference ID number.
Although there are several expressions being used, you can pinpoint what expressions are being used by looking for the name of the expression and the opening parenthesis.
The close parenthesis must always be at the end of an expression to close it. For example, where one expression is being used the closing parenthesis will be directly after the last data point or string.
As expressions become more complex, the closing parenthesis for an expression may not come until later. For instance, in the unique project ID number example, the first expression used, CONCAT, has the opening parenthesis. However, you don’t see the closing parenthesis until the very end.
The CONCAT expression can’t be finished or closed until all the desired components of the unique ID number are listed in the expression, so they can be chained together.
The information used with the expression can vary depending on the type of information you’re looking for.
You can use fields, words, numbers, or strings of information.
For instance, this expression is looking for the phrase or string, charity event, in the description field of an object.
So, it uses a data string and a field to capture the information being looked for, while this subtraction expression uses two fields to determine the difference between what has been logged and what was planned.
The type and number of data points and strings you use in an expression depends on the information you’re looking to appear in the custom field.
Now, when you’re writing data points and strings you have to remember to include some specific formatting, quotation marks, curly brackets, and camel case.
Quotation marks are used with strings or phrases that you want to look for in a field or add to an expression. For example, here we want to add the term hours to the number calculated by the sub expression, so it will say five hours instead of just the number five.
Fields used in expressions must be encased in curly brackets and be written in camel case, a common programming format to separate words using capital letters instead of spaces.
Now, if you use the field search in a custom form, those are automatically added when you click on the field to add it to the calculation field.
However, you can also write the expression on your own if you make sure both requirements are met. That way the calculation can be recognized and work within Workfront.
For more information on curly brackets and camel case, see the advanced reporting tutorials and text mode documentation provided on experienceleague.adobe.com.
Last but not least, are commas. Commas are used to separate data points and strings in the expression. For example, this subtraction expression uses two fields to determine the difference between what has been logged and what was planned. Each data point in this expression is separated by a comma to indicate that both data points have been entered into the expression.
No matter what kind of expression you create, the fundamental elements that must be included for the expression, either simple or complex, are the name of the expression, an open and closed parentheses, the data points or strings with curly brackets and camel case, and commas separating each data point or string. With that understanding, you’re ready to start building your expressions and gather the data you need about the work you and your team are doing. -
recommendation-more-help
c9fbcf61-6d19-481e-a9ab-f54a0ae0ee8a