Skip to content
Gallery
Coda template distribute nested values
Share
Explore

icon picker
Nested loops

Add rows with unique categories and ids + remove orphaned items

info

The green button:

Adds rows with categories to the target table
Removes rows in the target table when the categorie no longer lives in the source table
this can happen when due to an automation an order gets adapted (out of stock for example)
Removes rows in the source table when there are no categories

Complete Target Table
DB Source
1
2
3
4
5
Name
ID
categories
1
1
Duck
Chicken
2
2
Chicken
3
3
Cow
4
4
Sheep
6
5
Sheep
Horse
Chicken
There are no rows in this table

Clear Target Table
DB Target
1
2
3
4
5
6
7
8
Name
ID
Category
18
1
Duck
19
1
Chicken
20
2
Chicken
21
3
Cow
22
4
Sheep
25
5
Sheep
26
5
Horse
27
5
Chicken
There are no rows in this table

Categories
1
2
3
4
5
Name
Duck
Chicken
Horse
Cow
Sheep
There are no rows in this table
DB IDs
1
2
3
4
5
6
Name
1
2
3
4
5
6
There are no rows in this table

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.