Formulas (Notion): verschil tussen versies

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen
Regel 8: Regel 8:
  
 
This probably isn't a very useful example, as it includes a label in the property field - Excellent way to mess up data integrity.
 
This probably isn't a very useful example, as it includes a label in the property field - Excellent way to mess up data integrity.
 +
 +
== toNumber() ==
 +
 +
You need <code>toNumber()</code> for calculations that involve ''relations'': Eventhough the looked-up value might be a number, it isn't as it is a ''relation''. Example:
 +
 +
<pre>
 +
toNumber(prop("Product unit price")) * prop("Number of products")
 +
</pre>
  
 
== Sources ==
 
== Sources ==

Versie van 10 dec 2022 15:23

concat()

Concatenate strings, including output from commands. E.g.:

concat("Created: ", formatDate(prop("Time - Created"), "W"))

This probably isn't a very useful example, as it includes a label in the property field - Excellent way to mess up data integrity.

toNumber()

You need toNumber() for calculations that involve relations: Eventhough the looked-up value might be a number, it isn't as it is a relation. Example:

toNumber(prop("Product unit price")) * prop("Number of products")

Sources