Checkbox to tick other checkboxes

I have two tables of data for a collection DB. One for Items, one for Parts. Each item can be linked to multiple Parts via a Goes with column. Each Item has a Complete checkbox, while each Part has an Owned checkbox.

On ticking Complete, I’d like all the associated Parts to have their Owned checkbox ticked. I’ve done this via a simple formula thisRow.[Goes with].Complete.Mode()on the Parts checkbox. This works fine.

However I now lose the ability to manually check individual Parts I do/do not own. Is there a way to have the best of both functionalities? Or am I asking to have my cake and eat it too? Thanks!

1 Like

:wave: @Toy_Power

A suggestion would be to add an additional checkbox column called “Owned edit” (where you can manually check off) and then update the formula in Owned check box column with an If() or SwitchIf().

hope this helps!

Cheers!
Mel

1 Like

Hey @Toy_Power!
I suggest using a button instead that looks like a checkbox, and uses a hidden checkbox for the memory

1 Like

Hi @Melanie_Teh

Thanks for your suggestions. I’ve created an Owned_Total column and had a go with this formula

If(
  thisRow.Owned,
  True(),
  thisRow.[Goes with].Complete.Mode())

But the Total column honors both sorts of checks, but the tick doesn’t appear in the user-facing Owned column as per below.

I’ve never played with SwitchIf statements before so unsure how this may help. Thanks!

:wave: @Toy_Power

oh… you want both columns to be user-facing…
my suggestion then would be do an automation where trigger “Row changed” when Complete checkbox is checked, then check Owned for each part.

I’ve never played with SwitchIf statements before so unsure how this may help.

[Switchif() vs If()]

btw, your doc is awesome!! brings back so many memories and nostalgia for me :smiling_face:
and how amazing is it that coda is used for all sorts of things in lives of the people!!

Turtle Power!
MELangelo

p.s. @Rickard_Abraham suggestion above is so cool!
but just a note for those in future looking to incorporate it i.e. building implications -
as per @Paul_Danyliuk - try to limit row buttons as much as possible as it affects doc performance

2 Likes