Kition
tableDatabases

Family Recipe Box

Twelve recipes with cuisine, course, timings, heart ratings and diets, linked to ingredients for a shopping-cost rollup.

Family Recipe Box — Table sample rendered by Kition

A household recipe collection. A formula adds prep and cook time; a heart rating, a multi-select for diets and a photo address for the gallery view's covers. Recipes link to their key ingredients and a rollup prices the shopping list.

Steps

16 commands
showcase.yaml17 lines
steps:
  - {"command": "table.tables.delete", "params": {"tableId": 1}}
  - {"command": "table.tables.create", "params": {"title": "Recipes", "name": "recipes", "fields": [{"name": "recipe", "title": "Recipe", "type": "text", "primary": true}, {"name": "cuisine", "title": "Cuisine", "type": "text"}, {"name": "course", "title": "Course", "type": "single_select", "options": {"choices": ["Breakfast", "Brunch", "Starter", "Main", "Dessert"]}}, {"name": "prep", "title": "Prep (min)", "type": "number"}, {"name": "cook", "title": "Cook (min)", "type": "number"}, {"name": "total", "title": "Total (min)", "type": "formula", "formula": "{prep} + {cook}"}, {"name": "serves", "title": "Serves", "type": "number"}, {"name": "rating", "title": "Rating", "type": "rating", "options": {"max": 5, "icon": "heart"}}, {"name": "diet", "title": "Diet", "type": "multi_select", "options": {"choices": ["Vegan", "Vegetarian", "Gluten-free"]}}, {"name": "photo", "title": "Photo", "type": "url"}, {"name": "method", "title": "Method", "type": "long_text"}]}, "as": "t_recipes"}
  - {"command": "table.transact", "params": {"ops": [{"op": "records.create", "tableId": "$t_recipes.result.id", "records": [{"recipe": "Chickpea and spinach curry", "cuisine": "Indian", "course": "Main", "prep": 15, "cook": 25, "serves": 4, "rating": 5, "diet": ["Vegan", "Gluten-free"], "photo": "https://recipes.example/photos/1.jpg"}, {"recipe": "Red lentil soup", "cuisine": "Turkish", "course": "Starter", "prep": 10, "cook": 30, "serves": 6, "rating": 4, "diet": ["Vegan"], "photo": "https://recipes.example/photos/2.jpg"}, {"recipe": "Shakshuka", "cuisine": "North African", "course": "Brunch", "prep": 10, "cook": 20, "serves": 2, "rating": 5, "diet": ["Vegetarian"], "photo": "https://recipes.example/photos/3.jpg"}, {"recipe": "Lemon courgette spaghetti", "cuisine": "Italian", "course": "Main", "prep": 10, "cook": 15, "serves": 4, "rating": 4, "diet": ["Vegetarian"], "photo": "https://recipes.example/photos/4.jpg"}, {"recipe": "Sticky soy chicken", "cuisine": "Chinese", "course": "Main", "prep": 15, "cook": 35, "serves": 4, "rating": 5, "diet": [], "photo": "https://recipes.example/photos/5.jpg"}, {"recipe": "Apple crumble", "cuisine": "British", "course": "Dessert", "prep": 20, "cook": 40, "serves": 6, "rating": 4, "diet": ["Vegetarian"], "photo": "https://recipes.example/photos/6.jpg"}, {"recipe": "Crispy tofu bowls", "cuisine": "Japanese", "course": "Main", "prep": 20, "cook": 20, "serves": 2, "rating": 4, "diet": ["Vegan"], "photo": "https://recipes.example/photos/7.jpg"}, {"recipe": "Greek spinach pie", "cuisine": "Greek", "course": "Main", "prep": 30, "cook": 45, "serves": 6, "rating": 5, "diet": ["Vegetarian"], "photo": "https://recipes.example/photos/8.jpg"}, {"recipe": "Overnight oats", "cuisine": "Swiss", "course": "Breakfast", "prep": 5, "cook": 0, "serves": 1, "rating": 3, "diet": ["Vegetarian"], "photo": "https://recipes.example/photos/9.jpg"}, {"recipe": "Tomato and lentil dal", "cuisine": "Indian", "course": "Main", "prep": 10, "cook": 35, "serves": 4, "rating": 4, "diet": ["Vegan", "Gluten-free"], "photo": "https://recipes.example/photos/10.jpg"}, {"recipe": "Feta and egg muffins", "cuisine": "Greek", "course": "Brunch", "prep": 10, "cook": 20, "serves": 6, "rating": 3, "diet": ["Vegetarian", "Gluten-free"], "photo": "https://recipes.example/photos/11.jpg"}, {"recipe": "Coconut rice pudding", "cuisine": "Thai", "course": "Dessert", "prep": 5, "cook": 35, "serves": 4, "rating": 4, "diet": ["Vegetarian", "Gluten-free"], "photo": "https://recipes.example/photos/12.jpg"}]}]}, "as": "tx_recipes_0"}
  - {"command": "table.tables.create", "params": {"title": "Ingredients", "name": "ingredients", "fields": [{"name": "ingredient", "title": "Ingredient", "type": "text", "primary": true}, {"name": "aisle", "title": "Aisle", "type": "single_select", "options": {"choices": ["Chilled", "Condiments", "Dairy", "Dry goods", "Fruit", "Meat", "Tins", "Veg"]}}, {"name": "price", "title": "Price", "type": "number"}]}, "as": "t_ingredients"}
  - {"command": "table.transact", "params": {"ops": [{"op": "records.create", "tableId": "$t_ingredients.result.id", "records": [{"ingredient": "Chickpeas, tin", "aisle": "Tins", "price": 0.9}, {"ingredient": "Coconut milk", "aisle": "Tins", "price": 1.6}, {"ingredient": "Basmati rice", "aisle": "Dry goods", "price": 1.2}, {"ingredient": "Red lentils", "aisle": "Dry goods", "price": 1.4}, {"ingredient": "Spinach", "aisle": "Veg", "price": 1.5}, {"ingredient": "Lemon", "aisle": "Fruit", "price": 0.4}, {"ingredient": "Feta", "aisle": "Dairy", "price": 2.3}, {"ingredient": "Eggs (6)", "aisle": "Dairy", "price": 2.1}, {"ingredient": "Tomatoes, tin", "aisle": "Tins", "price": 0.8}, {"ingredient": "Spaghetti", "aisle": "Dry goods", "price": 1.1}, {"ingredient": "Courgette", "aisle": "Veg", "price": 0.7}, {"ingredient": "Chicken thighs", "aisle": "Meat", "price": 4.5}, {"ingredient": "Oats", "aisle": "Dry goods", "price": 1.3}, {"ingredient": "Apples", "aisle": "Fruit", "price": 1.8}, {"ingredient": "Tofu", "aisle": "Chilled", "price": 2.2}, {"ingredient": "Soy sauce", "aisle": "Condiments", "price": 2.0}]}]}, "as": "tx_ingredients_0"}
  - {"command": "table.fields.create", "params": {"tableId": "$t_recipes.result.id", "name": "ingredients", "title": "Key ingredients", "type": "link_to_record", "options": {"target_table_id": "$t_ingredients.result.id", "allow_multiple": true}}, "as": "f_recipes_ingredients"}
  - {"command":"table.transact","params":{"ops":[{"op":"cells.set","tableId":"$t_recipes.result.id","records":[{"rowKey":"$tx_recipes_0.result.created.0","values":{"ingredients":["$tx_ingredients_0.result.created.0","$tx_ingredients_0.result.created.1","$tx_ingredients_0.result.created.4","$tx_ingredients_0.result.created.2"]}},{"rowKey":"$tx_recipes_0.result.created.1","values":{"ingredients":["$tx_ingredients_0.result.created.3","$tx_ingredients_0.result.created.5","$tx_ingredients_0.result.created.8"]}},{"rowKey":"$tx_recipes_0.result.created.2","values":{"ingredients":["$tx_ingredients_0.result.created.7","$tx_ingredients_0.result.created.8","$tx_ingredients_0.result.created.6"]}},{"rowKey":"$tx_recipes_0.result.created.3","values":{"ingredients":["$tx_ingredients_0.result.created.9","$tx_ingredients_0.result.created.10","$tx_ingredients_0.result.created.5","$tx_ingredients_0.result.created.6"]}},{"rowKey":"$tx_recipes_0.result.created.4","values":{"ingredients":["$tx_ingredients_0.result.created.11","$tx_ingredients_0.result.created.15","$tx_ingredients_0.result.created.2"]}},{"rowKey":"$tx_recipes_0.result.created.5","values":{"ingredients":["$tx_ingredients_0.result.created.12","$tx_ingredients_0.result.created.13"]}},{"rowKey":"$tx_recipes_0.result.created.6","values":{"ingredients":["$tx_ingredients_0.result.created.14","$tx_ingredients_0.result.created.15","$tx_ingredients_0.result.created.2","$tx_ingredients_0.result.created.4"]}},{"rowKey":"$tx_recipes_0.result.created.7","values":{"ingredients":["$tx_ingredients_0.result.created.4","$tx_ingredients_0.result.created.6","$tx_ingredients_0.result.created.7"]}},{"rowKey":"$tx_recipes_0.result.created.8","values":{"ingredients":["$tx_ingredients_0.result.created.12","$tx_ingredients_0.result.created.13"]}},{"rowKey":"$tx_recipes_0.result.created.9","values":{"ingredients":["$tx_ingredients_0.result.created.3","$tx_ingredients_0.result.created.8","$tx_ingredients_0.result.created.2"]}},{"rowKey":"$tx_recipes_0.result.created.10","values":{"ingredients":["$tx_ingredients_0.result.created.7","$tx_ingredients_0.result.created.6","$tx_ingredients_0.result.created.4"]}},{"rowKey":"$tx_recipes_0.result.created.11","values":{"ingredients":["$tx_ingredients_0.result.created.1","$tx_ingredients_0.result.created.2"]}}]}]}}
  - {"command": "table.fields.create", "params": {"tableId": "$t_recipes.result.id", "name": "cost", "title": "Shopping cost", "type": "rollup", "options": {"link_field_id": "$f_recipes_ingredients.result.id", "target_field_id": "$t_ingredients.result.fields.2.id", "aggregation": "sum"}}, "as": "f_recipes_cost"}
  - {"command": "table.views.create", "params": {"tableId": "$t_recipes.result.id", "title": "Recipe cards", "type": "gallery", "config": {"cover_field_name": "photo"}}, "as": "gallery"}
  - {"command": "table.views.create", "params": {"tableId": "$t_recipes.result.id", "title": "Quick weeknight meals", "type": "grid"}, "as": "quick"}
  - {"command": "table.views.putFilterTree", "params": {"tableId": "$t_recipes.result.id", "viewId": "$quick.result.id", "tree": {"conjunction": "and", "children": [{"condition": {"field_id": "$t_recipes.result.fields.2.id", "operator": "eq", "value": "Main"}}, {"condition": {"field_id": "$t_recipes.result.fields.5.id", "operator": "lte", "value": 40}}]}}}
  - {"command": "table.views.putSorts", "params": {"tableId": "$t_recipes.result.id", "viewId": "$quick.result.id", "items": [{"field_id": "$t_recipes.result.fields.5.id", "direction": "asc"}]}}
  - {"command": "table.views.create", "params": {"tableId": "$t_recipes.result.id", "title": "By course", "type": "grid"}, "as": "bycourse"}
  - {"command": "table.views.putSorts", "params": {"tableId": "$t_recipes.result.id", "viewId": "$bycourse.result.id", "items": [{"field_id": "$t_recipes.result.fields.7.id", "direction": "desc"}]}}
  - {"command": "table.views.putGroups", "params": {"tableId": "$t_recipes.result.id", "viewId": "$bycourse.result.id", "items": [{"field_id": "$t_recipes.result.fields.2.id", "direction": "asc"}]}}
  - {"command": "table.records.list", "params": {"tableId": "$t_recipes.result.id", "limit": 100}, "as": "recs"}

Checks

9 checks on every build
  • inspect.tables = [{"title":"Recipes"},{"title":"Ingredients"}]
  • results.shown.result = {"view":"Recipe cards","viewType":"gallery","records":12}
  • results.recs.result.total = 12
  • results.recs.result.items.0.values = {"total":40,"rating":5,"diet":["Vegan","Gluten-free"]}
  • results.recs.result.items.0.values.ingredients = {"count":4}
  • results.recs.result.items.4.values.cost = {"approx":7.7,"tol":0.001}
  • results.gallery.result = {"type":"gallery","title":"Recipe cards"}
  • Diagnostics: none, the kit's own check finds nothing wrong
  • The saved document opens again, and its thumbnail matches thumb.png within the render tolerance

Related

More Table samples
tableDatabases

Conference Registrations

Twenty attendees with tickets, payment and check-in, linked to five sessions whose seats left come from a rollup and a formula.

2 tables; 1 dashboard
tableDatabases

Feedback Inbox Data Check

A customer feedback inbox where the kit's check finds a sentiment that is not one of the options and a required owner left empty.

1 table
tableProjects & Tasks

App Launch Task Tracker

Sixteen launch tasks with status, priority, assignees and due dates, rolled up into three milestones.

2 tables
tableCRM & Sales

B2B Sales Pipeline

Eighteen deals with stages, weighted values and owners, linked to eight companies that roll up their pipeline.

2 tables; 1 dashboard