<aside> <img src="/icons/info-alternate_gray.svg" alt="/icons/info-alternate_gray.svg" width="40px" /> Database button that counts up or when you click it, great for tracking habits or OKR’s.

</aside>

Details

This button allows you to add (aka. increases) a number by 1, or subtract (aka. decrease) by 1 from a fixed number, each time you click it. This is achieved in that each click adds a page to a second “helper” database with a relation to the page the button belongs to, and a formula is used to count the total number of related pages. Effectively, each new related page is 1 click and the formula displays the total number of pages/clicks.

To set this up you need:

Instructions

  1. Set up the two databases above.
  2. Configure the button in the main database as follows:
    1. When button is clicked, add a new page to “Helper Database”. The name of the new page doesn’t matter.
    2. Click “Edit another property” and select the relation. Set the relation (of the new page) to “This page” (the button’s page in the main database).
  3. Edit the formula property of the main database: select the relation property and add “.length()” behind it. For example, if your relation property is called “Helper Relation”, the formula should look like this (minus the quotation marks): “Helper Relation.length()
  4. If instead of counting upwards you want the counter to count down, add a fixed number in front of the formula followed by a dash (minus symbol), for example “10-”. Example: “100-Helper Relation.length()” counts down from 100, reducing the number by 1 with each click.

NOTE #1: The purpose of the formula is to count how many pages in the helper database are related to the item the button belongs to (aka. how many times the button has been clicked).

NOTE #2: Sadly, you cannot have two buttons that count up and down respectively. Countdown only works from whatever fixed number you apply in the formula.

For more information on setup, check out this video:

https://youtu.be/2erGp-gYzxs?si=r6QKG74USPcFAIUc

Formulas

Buttons

Interfaces

Workarounds

Beautification

Build Ideas

Notion Creators

Color Library

Free Icon Sets

Basic Cover Images

<aside> 💡 Tips:

➕ Hide the “helper” database in a sub-page, toggle or someplace else in your workspace.

➕ Change to a Gallery view to give your counters a neat look.

</aside>

Sample Counter Databases:

<aside> 💡

Database #1:

Main Database

</aside>

<aside> 💡 Database #2:

Helper Database

</aside>