Summarize Two Binary Tables

Hi, New to coda and trying to build a document to enable parents to match products to their children’s allergen requirements for play dates.

I’ve created two tables, one for children’s allergens and one for food product’s. I’m trying to find a way to combine these two tables to create a list of products that are ok for all the children’s requirements.

Curious if anyone has had any luck building anything similar ?

below are my two tables and here is a view of my document so far :


Hey @Ben_Krefting welcome to the community!

So this is a classic problem for Coda to solve. While your setup, or schema as we call it here, works and could be computed to get your answer, I have decided to take another schema. Here is my solution:

The main difference is changing the way you are storing the data from checkbox columns, to being stored in one column as an array/list.

You see we have to deal with each column at a time, and if you create multiple columns like that, we can traverse them and get the answer, but you are going to need lots of code and if() statements.

My approach allows us to store all of the information in one column, and then we are able to compare what are in those columns with other rows/columns and distill who can eat what!

I left the original checkboxes in, so you can see how my approach differs.

Take a look and let me know if you have any questions about my approach.

:stopwatch: tldr: tater tots


That’s awesome and really helpful ! Thank you

i really like this solution, thank you @Johg_Ananda for this.

for me this is an example of how CODA-thinking differs from TRADITIONAL-thinking concerning databases.

i am so used to highly optimized ‘third normal form’ relational models (that forbid recurring items in a column), that i forget that LISTS can implement many-to-many relationships and are not only ALLOWED in coda but have many desirable properties.


1 Like