🎴 Flashcards
Notion formulas can mimic flashcards inside a database using the replaceAll function. Required is a question and answer property, a hidden answer property and a reveal checkbox to flip the card. In addition, I include a checkbox to only reveal vowels, a “type answer” field, and a simple check if answer is correct.
The Question And Answer
Before using the database, I hide the answer property.
Hide And Reveal Answer
Use the Reveal Full checkbox to show answer, and the Vowels checkbox to provide a hint (only vowels).
Hidden Answer Formula:
if(prop("Vowels"), replaceAll(prop("Answer"), "[^AaEeIiOoUu ]", "[]"), if(empty(prop("Reveal Full")), replaceAll(prop("Answer"), "[A-z0-9]", "[]"), if(prop("Reveal Full"), prop("Answer"), "")))
Find If Answer Is Correct
If Typed Answer is correct, Correct checkbox will tick true. If typed answer is correct but not written exactly like the Answer property, an Override Correct checkbox is available.
Correct Formula:
if(prop("Override Correct") == true, true, if(prop("Answer") == prop("Type Answer"), true, false))