Hello, I would like know what functions I should use in case I have three (or more) checkboxes and depending whether they are all ticked or not, two other cells change their values (e.g. one may be “Ready” or “Nor Ready”, while the progress bar should change its value) (see the attached example.)
Thank you!
welcome to the community !
Firstly, Coda formulas, formula library, formula cheat sheet - Coda is gonna be your yoda and best friend when it comes to the coda formula language and your doc building journey
For Result column:
To explain what this all means…
If all of Test 1, Test 2 and Test 3 is true, then “Ready”, otherwise “Not Ready”.
There are 3 formulas used.
SwitchIf() or you can also use If() (i find SwitchIf() more performant) is the conditional statement to determine between “Ready” and “Not Ready”.
We need to make the columns Test 1, Test 2 and Test 3 into a list to use it in the All() formula, hence the ListCombine().
The other part of All() is the “expression”. This is where CurrentValue comes in. You can put CurrentValue=true, but as @Paul_Danyliuk says, it is not neccessary
For Advancement column:
We are finding out which of the Test 1, Test 2 and Test 3 are true
(ListCombine(thisRow.[Test 1], thisRow.[Test 2], thisRow.[Test 3]).Filter(CurrentValue=true).Count()),
then dividing that by Total amount of columns ( ListCombine(thisRow.[Test 1], thisRow.[Test 2], thisRow.[Test 3]).Count()),
then multiplying this by 100 to get the percentage and finally rounding down RoundDown() as per your sample in original post i.e. 66 for 2/3 checked.
Please find copy of demo doc to help if need be.
Hope this helps!
Cheers!
Mel
@Duke and anyone new…
this is a great resource i discovered today for learning coda formula language (CFL).
it explains foundations of CFL with visuals of incl. objects, chips, what the colours mean and chaining vs wrapping.
understanding and knowing these will make CFL less scary hopefully and make you half way there to being CFL literate