![]() ![]() We've also sorted the table by this Attention property to amplify the urgency.16072 Users have visited the forum. The formula tests if the Progress property contains two or more empty circles and the Days Since Order is seven or more days. ![]() We can achieve this with nested if() functions: if( prop( "Cost of Goods" ) = 7 ), "?", "" ) Where Cost of Goods is $50 or more, Markup is 15%.Where Cost of Goods is $10 or more, but less than $50, Markup is 20%.Where Cost of Goods is less than $10, Markup is 25%.Say we want our Markup to correlate with the Cost of Goods ( number): Markup calculations would typically occur in an independent Products database, but for simplicity's sake, we've included them here. Because the Order # is a number, we use the format() function to convert it to a string so it can be merged with the Product SKU ( text) using the concatenation operator ( +) format( prop( "Order #" ) ) + "-" + prop( "Product SKU" ) Calculate Markup Given the Order # ( number) and Product SKU ( text), we can generate a unique ID, which we can easily paste into the ID ( title) property. Generate a Unique IDÄatabases often need a unique ID for each item. For example, Order #1 contains two products (P18 and P21), and therefore has two items in the database: 1-P18 and 1-P21. The database contains an item for each unique Order-SKU pairing. The next set of examples augments a database of orders from an online business. concat( "Age: ", format( prop( "Age" ) ) ) concat( "School: ", prop( "School" ) ) Ecommerce Orders When we do so, we also need to convert Age ( number) to text using the format() function. Using the concat() function, we can add a label to those properties. When we display the roster as a Gallery, some properties stand alone ambiguously without context, such as Age. Given each player's Birthday ( date), we can determine their ages with the dateBetween() and now() functions: dateBetween( now(), prop( "Birthday" ), "years" ) Add Context to Gallery Cards Given each player's First Name ( text) and Last Name ( text), we can create a Formula property that combines them into a Full Name using the + operator: prop( "First Name" ) + " " + prop( "Last Name" ) Calculate Age Side note: If you're a hoops fan, you'll appreciate The NBA - in Notion. ![]() We'll begin with a database of players who comprise a basketball team. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |