getNameFromAsset()

Text

This function returns the name (attribute is flagged with label icon) for a given asset object key. In case the given key is not valid or empty, null is returned. 

Bash
getNameFromAsset(objectKey) #Output: Text

Examples

Parser expression

Description

Bash
%{getNameFromAsset("PTAS-1")}

This example returns the name of the asset object with key "PTAS-1", e.g.:

PHONE-001

Bash
%{getNameFromAsset(%{issue.cf12566})}

This example returns the name of the asset object (for example, from an asset object custom field with a single object), e.g:

macBook Air 13

Additional information

Parameters used in this function

Parameter

Input (data type)

Description

objectKey

text

Text containing a valid single asset object key.

Output

This function returns a text LIST


Text list

Variant for multiple asset objects. In case one of the given keys is not valid or empty,  null is returned to its position on the list. 

Bash
getNameFromAsset(objectKeys) #Output: Text list

Examples

Parser expression

Description

Bash
%{getNameFromAsset(["PTAS-1","PTAS-2"])}

This example returns the names of asset objects with the keys "PTAS-1", "PTAS-2", e.g.:

PHONE-001, PHONE-002

Bash
%{getNameFromAsset(toStringList(%{issue.cf12567}))}

This example returns the names of the asset objects (for example, from an asset object custom field with multiple objects), e.g.:

iPhone 13, iPhone 16

To achieve this, the following function is used:

Additonal information

Parameters used in this function

Parameter

Input (data type)

Description

objectKey

text LIST

Any valid text list containing asset object keys.

Output

This function returns a text LIST


(books) Use cases and examples