Formulas

🟢 / ❌ Buttons - Next Practice date update

lets(
  /* Spaced repetition intervals in days: 1, 3, 7, and 30 days */
  intervals, [1,3,7,30],
  
  correctAnswersStreak, context("This page").prop("Answers").replaceAll(".*[^🟢]", ""),
  currAnswerSeq, min(intervals.length()-1, correctAnswersStreak.length()-1),
  nextInterval, intervals.at(max(0, currAnswerSeq)),
  
  /* Calculate next practice date by adding interval to today */
  today().dateAdd(nextInterval, "days")
)

Prompts for Vocabulary Flashcards

Vague Prompt

I want you to build for me a flashcard system for learning Polish words. It must follow the spaced repetition practice with this intervals [1,3,7,30].

Features that I need:

- possibility to easily add new words and add them to the spaced repetition schema
- possibility to review the words according to the intervals: I want to only see the words that are supposed to be practiced today (or the ones that I missed to practiced lately). I want it to work as a flashcard: see the word in English, trying to recall it and then check the answer (the Polish version) and then mark this word as recalled correctly or incorrectly. Next Review date should be set automatically according to the intervals schema. I only want to mark a word as answered correctly or incorrectly.
- possibility to archive the words I feel confident about.
- possibility to occasionally review the archived words and be able to return them to the main deck
- possibility to review the words I failed to recall lately (just to see English and Polish version without need to mark the answers)
- add 20 random words, 5 of them with today as the next practice date, 5 of them archived

Very Specific Prompt

I want to build a flashcard system for learning Polish words.

Enable the Full width mode.
Create a database with the next properties: 
- Name (type: Title)
- English (type: Text)
- Polish (type: Text)
- Added (type: Created Time)
- Last Practiced (type: Date, format: DD/MM/YYYY)
- Next Practice (type: Date, format: DD/MM/YYYY)
- Answers (type: Text)
- Correct (type: Button)
- Incorrect (type: Button)

- Show Answers (type: Checkbox)
- Answer [Hint] (type: Formula, should show the Polish word version in bold and blue if Show Answer is true and a new line character if Show Answer is false)

- Archived (type: Checkbox)
- Archive (type: Button)

Template:
- Add a template for this database with this name “ “ (a space character), make it default for all the records in this database

Views:
- New words (type: Table)
    - Visible columns: English, Polish, Correct, Name (only those properties)
    - Hide icons and vertical lines
- Review (type: Gallery)
    - Visible properties:
        - Answer [Hint] on a separate line
        - English version on a separate line
        - Show Answer checkbox on a separate line
        - Correct, Incorrect, Archive buttons (all 3 on the same line, use Compact Gallery mode for that)
    - No page previews
    - Filter: only records with Next Practice date set on or before today
    - Sorting: by Last Practice in ascending order
- Review Failed (type: Table)
    - Visible properties: English, Polish
    - No icons, no vertical lines
- Review Archived (type: Gallery)
    - Visible properties:
        - Answer [Hint] on a separate line
        - English version on a separate line
        - Show Answer checkbox on a separate line
        - Correct, Incorrect buttons (all 3 on the same line, use Compact Gallery mode for that)
    - No page previews
    - Filter: only records with Archived set to true
    - Sorting: by Last Practice in ascending order
- Debug (type: Table)
    - Visible properties: all of them

Add 20 random words so that I could test the system. Set Next Practice date to today for 5 of them, archive another 5.

Formula Prompt - 🟢 / ❌ Buttons - Answers log update

add 🟢 to the existing Answers log (no spaces)
add ❌ to the existing Answers log (no spaces)

Formula Prompt - 🟢 / ❌ Buttons - Next Practice update

<aside>