Advanced Customization Guide for The Happy Kitchen

Change the meal planning week to start on Monday #
  1. From your dashboard, open one of the days in the “Planning” section
  2. Unhide the hidden properties
  3. Locate the “Date53” property and change the “w” references to “W” (or copy/paste the following formula):

if(year(prop("Date")) - year(now()) == 1, (toNumber(formatDate(prop("Date"), "W")) == 1 and month(prop("Date")) == 11) ? 105 : (toNumber(formatDate(prop("Date"), "W")) + 52), if(year(prop("Date")) == year(now()), (toNumber(formatDate(prop("Date"), "W")) == 1 and month(prop("Date")) == 11) ? 53 : if(formatDate(prop("Date"), "DDD") == "1", -1, toNumber(formatDate(prop("Date"), "W"))), 0))

4. Locate the “Now53” property and change the “w” references to “W” (or copy/paste the following formula):

(toNumber(formatDate(now(), "W")) == 1 and month(now()) == 11) ? 53 : toNumber(formatDate(now(), "W"))

5. Re-hide the hidden properties

5. Back on the dashboard in the “Planning” section, drag the Sunday column all the way to the right and drop it after Saturday

Populate the shopping list immediately #
  1. Navigate to one of the date entries (in the Meal Planning database)
  2. Unhide the hidden properties
  3. Replace the “Within 3 days?” formula to:

if(timestamp(prop("Date")) > timestamp(now()) - 86400000, true, false)

This will activate any future days that have meals planned and add the ingredients to your grocery list immediately.

Change the 3-day grocery shopping rule to 7 days (or other) #

You can change the number of days for how frequently (or infrequently) you go grocery shopping. The formula is in the Meal Planning database. The property is titled “Within 3 days?” and is hidden. It looks like this:

if(timestamp(prop("Date")) > timestamp(now()) - 86400000, if(dateBetween(prop("Date"), now(), "days") + 1 <= 2, true, false), false)

Change the number “2” to the number of days between grocery shopping minus 1. For example, if you go grocery shopping once a week you would change the formula to this:

if(timestamp(prop("Date")) > timestamp(now()) - 86400000, if(dateBetween(prop("Date"), now(), "days") + 1 <= 6, true, false), false)

The Happy Kitchen - Change shopping days formula
  #
Add quantity overrides for ingredients in recipes #

This is now possible and is baked into the newest version of The Happy Kitchen. However, if you have an older version of The Happy Kitchen, you may want to add the ability to set overrides for ingredient quantities within recipes. Here is how you can make this customization yourself:

Modify meal card: #
  1. Open a meal / recipe from the dashboard
  2. Click to unhide the hidden properties
  3. Create a new text property called “Ingredient Quantities”. Drag it to just below the Ingredients list. Set this property to “Always Show”
  4. Create a new formula property called “Ingredient Quantities Rollup”. Set this property to “Always Hide”
  5. Paste this formula into the new formula property:

if(toNumber(prop("Planned")) > 0, prop("Ingredient Quantities"), "")

  1. Re-hide the properties and close the recipe card
Modify grocery item card: #
  1. Open a grocery item card from the dashboard
  2. Click to unhide the hidden properties
  3. Create a new rollup property called “Recipe Quantities”. Set this property to “Always Hide”
  4. Configure the rollup:
    1. Relation: “Meals”
    2. Property: “Ingredient Quantities Rollup”
    3. Calculate: “Show original”
  5. Create a new formula property called “Recipe Quantities Formula”. Set this property to “Always hide”
  6. Paste this formula into the new formula property:

replaceAll(prop("Recipe Quantities"), ", ", ",")

  1. Create a new formula property called “Count”. Set this property to “Always hide”
  2. Paste this formula in the new formula property:

prop("Recipe Quantities") ? (length(replaceAll(replaceAll(prop("Recipe Quantities"), ",", "~"), "[^~]", "")) + 1) : 0

  1. Create a new formula property called “Recipe Quantity”
  2. Paste this formula into the new formula property:

if(prop("Shopping List"), if(prop("Count") > 0, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){0}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){0}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 1, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){1}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){1}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 2, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){2}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){2}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 3, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){3}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){3}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 4, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){4}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){4}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 5, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){5}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){5}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 6, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){6}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){6}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 7, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){7}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){7}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 8, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){8}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){8}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 9, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){9}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){9}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 10, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){10}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){10}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 11, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){11}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){11}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 12, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){12}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){12}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 13, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){13}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){13}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 14, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){14}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){14}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 15, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){15}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){15}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 16, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){16}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){16}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 17, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){17}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){17}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 18, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){18}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){18}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 19, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){19}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){19}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 20, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){20}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){20}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 21, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){21}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){21}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 22, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){22}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){22}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 23, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){23}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){23}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 24, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){24}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){24}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 25, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){25}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){25}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 26, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){26}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){26}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 27, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){27}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){27}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 28, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){28}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){28}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 29, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){29}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){29}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0) + if(prop("Count") > 30, toNumber(if(test(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){30}", ""), ",.*", ""), prop("Name")), replaceAll(replaceAll(replace(prop("Recipe Quantities Formula"), "(?:[^,]*,){30}", ""), ",.*", ""), "[^0-9]", ""), "0")), 0), 0)

  1. Modify the “Calculated Quantity” formula, replace the existing formula with this formula:

if(prop("Recipe Quantity") > 0, prop("Recipe Quantity") + prop("Quantity"), if(empty(prop("Quantity")), 1, prop("Quantity")))

  1. Re-hide the hidden properties and close the grocery item card.
HOW IT WORKS #

When creating new meals / recipes, define any special quantities for ingredients that are more than 1 in the new “Ingredient Quantities” property. There are two requirements:

  1. The ingredient name must match the grocery item name exactly
  2. Ingredient quantities must be separated by a comma

Other than that, pretty much anything goes. Here are some examples of how you can define quantity overrides for ingredients in a recipe:

  • Chia Seeds [3], Raisins [2], Rolled Oats [2]
  • Chia Seeds (3), Raisins (2), Rolled Oats (2)
  • Chia Seeds 3, Raisins 2, Rolled Oats 2

Any ingredient quantity overrides for upcoming meals that have ingredients on the shopping list will be tallied in addition to standard ingredient overrides that you’ve already set for your pantry. The script will iterate through up to 30 overrides.

Don't go solo. Navigate all the complexities of life with your Sidekick!

X