Map an item using built-in functions
Workfront Fusion includes built-in functions that allow you to create simple or complex formulas. These functions cover a wide variety of use cases, including functions for arrays, strings, numbers, and data from previous modules.
In addition, you can create custom functions and packages that your scenarios can then use to transform and manipulate data.
For information and instructions on custom functions, see Map data using custom functions.
For information and instructions on function packages, see Use custom function packages.
Access requirements
| table 0-row-2 1-row-2 2-row-2 layout-auto html-authored no-header | |
|---|---|
| Adobe Workfront package |
Any Adobe Workfront Workflow package and any Adobe Workfront Automation and Integration package Workfront Ultimate Workfront Prime and Select packages, with an additional purchase of Workfront Fusion. |
| Adobe Workfront licenses |
Standard Work or higher |
| Product |
|
For more detail about the information in this table, see Access requirements in documentation.
Map data using built-in functions
When you map items, you can use functions to create simple or complex formulas. The functions available are similar to functions in Excel and in some programming languages:
- They evaluate general logic, math, text, dates, and arrays.
- They let you perform conditional logic and transformations of item values, such as converting a text to uppercase, trimming text, converting a date into a different format, and more.
Insert functions into fields
To insert a function into a field:
-
Click the Scenarios tab in the left panel.
-
Select the scenario where you want to map data.
-
Click anywhere on the scenario to enter the Scenario editor.
-
Click the field where you want to insert a function.
-
Select the tab in the mapping panel that contains the function you want to insert.
For information on mapping panel tabs, see Function overview
-
Click the function name.
Or
Drag the function into the field.
-
Configure the function parameters.
For an explanation of function parameters, hover over the function in the mapping panel.
For more information on functions and their parameters, see the articles under Function references: article index.
-
Continue configuring the module, or click OK.
Example: Some data types prevent users from entering more than a certain number of characters. You can use the substring function to limit a value to a certain number of characters.
In this example, the substring function limits project name to 50 characters.
Nesting functions
You can nest functions within each other.
Example:
In this example, the substring function limits the trimmed project name to 50 characters.
To nest a function:
-
Click the field where you are creating a formula.
This opens the mapping panel.
-
Click the first function that you want to add. This is the function on the outside. If the following example, this is the
substringfunction. -
In that function, click where you want the nested function to go. In this example, the nested function goes in the place of the first parameter.
-
In the mapping panel, click the nested function. In this example, this is the
trimfunction. -
Continue configuring the function as desired.
-
Continue configuring the module, or click OK.
Generate an expression with AI
Instead of writing the syntax of an expression yourself, you can describe what you want in plain language, and AI generates the expression for you. For example, you can ask for the following:
- Join these names with a comma.
- Add three days to the due date.
AI turns your request into an expression that uses Workfront Fusion’s built-in functions, so the result is readable and easy to review before you use it.
To generate an expression:
-
Click the Scenarios tab in the left panel.
-
Select the scenario where you want to map data.
-
Click anywhere on the scenario to enter the Scenario editor.
-
Click the module where you want to add an expression, then click the field.
The mapping panel opens.
-
Click the Fill by AI tab (the magic wand icon) in the mapping panel.
-
In the Describe what this field should contain box, describe the result that you want in plain language.
To add a field from a previous module to your prompt, click it in the Available fields list. To start a new line in the prompt, press Shift+Enter.
For example, to get only the domain from an email address, you could enter the following prompt:
Show only the domain of {{1.data.json.email}} like "user@acme.com" -> "acme.com" -
Click Generate.
The expression that AI generates appears under Suggested expression.
-
Review the expression, then do one of the following:
- Click Apply to insert the expression into the field.
- Click Regenerate to have AI generate a different expression.
-
(Optional) Edit the expression in the field if desired.
-
Continue configuring the module, or click OK.
How AI generates expressions
When AI generates an expression, it does the following:
- Uses the context of your scenario. AI considers the fields that are available to map, their types, the destination field, and your locale and time zone settings.
- Validates the expression. Before AI returns an expression as successful, it checks for unsupported functions, missing arguments, unknown field references, and common mistakes with arrays and dates.
- Corrects and simplifies the expression. AI fixes common syntax mistakes, and replaces recognized workarounds with built-in functions.
- Tries again if validation fails. AI uses the specific feedback from the validation to regenerate the expression. If it still cannot create a valid expression, it returns a clear error instead of an invalid result.
Use Google Sheets functions
If Workfront Fusion does not feature a function you want to use, but it is featured by Google Sheets, you can use it by following these steps:
-
In Google Sheets, create a new empty spreadsheet.
-
In Workfront Fusion, open your scenario.
-
Add the Google Sheets >Update a cell module to the scenario.
-
Configure the module:
-
Choose the newly created spreadsheet in the Spreadsheet field.
-
Insert your formula containing the Google Sheets function(s) into the Value field.
You can use the output of preceding modules as usual.
-
-
Insert the Google Sheets >Get a cell module to obtain the calculated result.
-
Configure the module, using the same Cell ID that you used in step 4.