New in Formulas 2.0
The email()
function returns the email address of a Person data type.
email(person)
email(personProperty.first())
person.email()
personProperty.first().email()
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").email()
. If used on a created Person property, you’ll need to use the first
function as well, even if the property is set to a limit of 1.
prop("Assignee").first().email() /* Output: "[email protected]" */
Code language: CSS (css)
You can also utilise map
to return the email address for each person added to the Person property.
prop("Assignees").map(current.email()) /* Output: ["info@collegeinfogeek.com", "ben@collegeinfogeek.com" */
Code language: PHP (php)
Example Formulas
email(prop("Created By"))
/* Output: "[email protected]" */
prop("Assignee").first().email()
/* Output: "[email protected]" */
Code language: JavaScript (javascript)
Note that the email comes back as plain text, not a link. You would need to use the link
function and the mailto:
prefix to add the email address.
prop("Last Edited By")
.email()
.link("mailto:" + prop("Last Edited By").email())
/* Output: "[email protected]" (as a link) */
Code language: JavaScript (javascript)