Filter a table by words in a page

TL;DR

I need a formula to filter Table values by the Page’s Text contents. Something like CurrentPage.Text.Contains(CurrentRow.Word)

Use case

I’m learning a language.

I have a big table for Vocabulary, it contains all the words I’ve learnt so far.

For every homework that I do, I have a separate page.

I want to add the Vocabulary table to a homework page, and filter by words used in the homework.

Example of a Homework Page

Title: frogs.
Body: Little frogs jump over big toads. Big toads run away from bullfrogs.
Filtered Vocabulary (4 entries):

  • Frog – the standard term for the amphibian
  • Toad – often used for frogs with drier, bumpier skin (e.g. cane toad)
  • Bullfrog – a large frog species known for its deep call
  • Jump – raise in air, leaping, useful to get over obstacles

Explanation

The Vocabulary table contains many entries (1000+), but the Frogs Homework page uses only 4 words from the Vocabulary.

Summary

I need a formula to filter Table values by the Page’s Text contents. Something like CurrentPage.Text.Contains(CurrentRow.Word)

Many thanks to the Coda Community for providing a wast resource of information! <3

TL;DR

use the canvas column as page
split the words on space Split(" ") and filter on a list of words

cheers, christiaan

4 Likes

Hello! Thank you for the reply!

I’m not entirely sure I understand the suggested data relationship pattern here.

Once I added a canvas column – now every row has it’s own separate page. So relation ship between pages and rows is 1-1. 10 rows = 10 pages, is that correct?

However, I was aiming at the relationship 1 page => many rows & many pages => 1 row, ie 1 page may reference many rows, and many pages can reference the same row.

I’m not entirely sure how to model that with the Canvas Column approach.

Thank you!

I’ve also tried to reference current page in the table’s Canvas Column, but I only see PageName among formulas. And that gives me just a string with the Homework’s name, not its content.

correct, but a pages understood as a canvas column

the pages you see on your screen we cannot reference for the task you have in mind

try writing a small text in the canvas column, the reference it like this:

canvascolumn.split(" "). Filter(currentvalue.contains(list of words)).join(" ")

this should do the job, if not maybe others are willing to help you out further.

cheers, christiaan