<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" width="40px" /> This example database collects several different pieces of customer information, including first name, last name, phone number, and location. The Info formula neatly formats all of this information into a single cell.
Created by Thomas Frank | Learn Notion Formulas | Notion Basics | Templates | Twitter
</aside>
// Compressed
concat("🧑 ", prop("First Name"), " ", prop("Last Name"), "\\n📍 ", prop("Location"), "\\n☎️ ", prop("Ph Format"))
// Expanded
concat(
"🧑 ",
prop("First Name"),
" ",
prop("Last Name"),
"\\n📍 ",
prop("Location"),
"\\n☎️ ",
prop("Ph Format")
)
<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" width="40px" /> To display phone numbers in a more consistent manner, there is a helper property - Ph Format - which formats the data from the Phone property. Info then pulls from Ph Format rather than Phone directly.
</aside>
// Compressed
"(" + slice(replaceAll(prop("Phone"), "[() .-]", ""), 0, 3) + ") " + slice(replaceAll(prop("Phone"), "[() .-]", ""), 3, 6) + "-" + slice(replaceAll(prop("Phone"), "[() .-]", ""), 6, 10)
// Expanded
"(" +
slice(
replaceAll(
prop("Phone"), "[() .-]", ""
), 0, 3
) +
") " +
slice(
replaceAll(
prop("Phone"), "[() .-]", ""
), 3, 6
) +
"-" +
slice(
replaceAll(
prop("Phone"), "[() .-]", ""
), 6, 10
)