Map an array in Adobe Workfront Fusion
An array is a special type of item that can contain the following:
- One or more text values (simple array)
- One or more collections of the same type (complex array)
For more information, see Item data types in Adobe Workfront Fusion.
Access requirements
You must have the following access to use the functionality in this article:
To find out what plan, license type, or access you have, contact your Workfront administrator.
For information on Adobe Workfront Fusion licenses, see Adobe Workfront Fusion licenses.
Map an entire array
-
In the modules that you are mapping the array to, click the field where you want to map the array. This is the field that the array is mapped to.
-
In the box that displays, map the item.
The panel allows you to map fields in the same way as with any other type of item. If you do not want to fill in each item separately, but want to map another array into the target field, use the Map button. In this case, make sure that both arrays (the source array and the target array) have the same structure.
You can add any number of items to an array.
You can divide an array into individual bundles using an iterator. Fore more information, see Iterator module in Adobe Workfront Fusion.
Map items into a new array
Some fields in Workfront Fusion allow you to map elements into an array. For example, you can create an array of checklist items into the Workfront Boards > Add checklist item module. When the module is run, all of the checklist items are added to the card.
Any module field that displays “Add item” creates an array.
To add elements to the array:
- Click Add item
- In the panel that opens, enter details about the item.
- Click Add.
- (Optional) Repeat steps 1-3 for each element you want to add to the array.
Map array elements
Map array elements by number
Array elements display as a number in square brackets after the array name. You can map an individual element of an array into a field by using this index number.
To map an array element:
-
Click the field where to you want to map the element.
The mapping panel opens.
-
Locate the array that contains the element you want to map.
-
Click the dropdown arrow next to the array.
-
Click the element that you want to map.
The element is mapped, with the index of 1. This maps the first element in the array.
-
To map a different element of the array, click on the [1] and enter the index number of the array element that you want to map.
Map an array’s element with a given key
Some arrays contain collections with key-value items such as metadata, attributes, and so on. To use one of these values, you can look up an element by its given key value and obtain the corresponding value from the value item. We recommend using a formula employing a combination of the map()
and get()
functions.
The following example shows the output of the Jira App.
This example gets a file name from an array of attachments, for the specific attachment with an ID of 10108.
This example generates the following output:
The formula can be explained as follows:
-
map
-
The first parameter of the
map()
function is the whole array item. -
The second parameter is the raw name of the value item. To obtain the raw name, hover over the item in the mapping panel:
note note NOTE All parameters are case sensitive. Even though in this particular example the item’s label differs from its raw name only in capitalization, it is necessary to use the raw name. -
The third parameter is the raw name of the key item:
-
The fourth parameter is the given key value.
Because the
map()
function returns an array (as there could be more elements with the given key value), it is necessary to apply theget()
function to get its first element: -
-
get
-
The first parameter of the
get()
function is the result of themap()
function. -
The second parameter is the element’s index. In this exammple, the index is
1
.
-
This example generates the following output:
For more information about the map()
function, see Array functions.
For more information about the get()
function, see General functions.
Convert array elements to a series of bundles
Arrays can be converted to a series of bundles using the Iterator module. For more information, see Iterator module.