Duplicating a row with its relationships

Hello :smiley:,
I’m wondering if we can “Duplicate current row with its relationships” ?
If I duplicate one Catalog, I want also duplicate each Page related to it.

Thanks

Hi @Sao. That’s an interesting idea.

Grist doesn’t support it today, but you could construct such functionality for a particular table with the ActionButton custom widget. A somewhat similar application was a topic in a webinar here: Build with Grist Webinar - Custom Widgets - Apr 14, 2022 - YouTube, and the usage of ActionButton is described in this post (there is a link to an example there).

For a general feature, duplicating related records isn’t always appropriate. E.g. a line in a shopping cart would have a reference to some Product. But since it’s not a part of the product, it wouldn’t make sense to duplicate it if one were duplicating the product. In other words, the user would need to choose which relationships are included into the duplication.

It would be cool if Grist had a concept of “ownership”, i.e. whether a Page is “owned” by the Catalog it refers to. That could mean that duplicating a catalog would duplicate its owned pages, and deleting a catalog would delete its owned pages.

2 Likes