The name()
function returns the full name of a person.
name(person)
name(personProperty.first())
person.name()
personProperty.first().name()
Code language: JavaScript (javascript)
If used on a built-in Created By or Last Edited By property, you can use the function directly like prop("Created By").name()
. These property types contain a single Person value.
By contrast, Person properties contain a list of Person objects. Therefore, you’ll need to use an accessor function like first, last, or at to select a specific element from the list, then call name()
on that element:
prop("Assignee").first().name() /* Output: "Thomas Frank" */
Code language: JavaScript (javascript)
You can also utilise map to return the name for each person added to the Person property.
prop("Assignees").map(current.email()) /* Output: ["Thomas Frank", "Martin Boehme" */
Code language: CSS (css)
Example Formulas
name(prop("Created By")) /* Output: "Thomas Frank" */
prop("Assignee").first().name() /* Output: "Thomas Frank" */
Code language: JavaScript (javascript)