Skip to content
Counting CheckBoxes in Canvas
Share
Explore

icon picker
Freerk

Filtering out multiple style elements on your canvas
In the community I got a response from . Since in his canvas he also had style elements like H2 and H3, he needed a way to only get the check boxes. I tweaked his suggestion just a bit and ended up with the snippet below.
thisRow.Notes._Merge().ToText().ParseJSON("$..style").ListCombine().Filter(CurrentValue.Contains("CheckboxList")).Count()
the general learning is that you have to add a filter in case you have multiple style elements in your canvas.
Freerk
2
Name
Notes
step0
step1
step1B
step1C
step2
allInOne
1
row 1
invoicing new client
calling supervisor
planning day

Testing Freerk logic

Open
{"type":"slate","root":{"children":[{"alignment":"Left","children":[{"text":"invoicing new client"}],"id":"cl-grid-6wGfsPxNcz::i-EUTm8rpWUh::c-vL52NrhYBL-0","lineLevel":0,"style":"CheckboxList","type":"Line","isChecked":true},{"id":"cl-DqiLUBMMO4","type":"Line","style":"CheckboxList","children":[{"text":"calling supervisor"}],"alignment":"Left","lineLevel":0,"isChecked":true},{"id":"cl-iaTmXg6MBw","type":"Line","style":"CheckboxList","children":[{"text":"planning day"}],"alignment":"Left","lineLevel":0},{"id":"cl-LhA-3kqt8o","type":"Line","style":"Paragraph","children":[{"text":""}],"alignment":"Left","lineLevel":0},{"id":"cl-Ry3J-o5jC4","type":"Line","style":"H3","children":[{"text":"Testing Freerk logic"}],"alignment":"Left"}],"normalizationOpsQueue":[]}}
CheckboxListCheckboxListCheckboxListParagraphH3
CheckboxListCheckboxListCheckboxList
3
truetrue
2
row 2
breakfast
writing
reading
running
lunch

adding additional content
trying stuff

writing H3


Open
{"type":"slate","root":{"children":[{"alignment":"Left","children":[{"text":"breakfast"}],"id":"cl-grid-6wGfsPxNcz::i-4LW20XP1xj::c-vL52NrhYBL-0","lineLevel":0,"style":"CheckboxList","type":"Line","isChecked":true},{"id":"cl-iMHMT8wDW8","type":"Line","style":"CheckboxList","children":[{"text":"writing"}],"alignment":"Left","lineLevel":0,"isChecked":true},{"id":"cl-Hv6ZBcIte5","type":"Line","style":"CheckboxList","children":[{"text":"reading"}],"alignment":"Left","lineLevel":0,"isChecked":true},{"id":"cl-iArzMyxdHy","type":"Line","style":"CheckboxList","children":[{"text":"running"}],"alignment":"Left","lineLevel":0,"isChecked":true},{"id":"cl--Q9wGftTp9","type":"Line","style":"CheckboxList","children":[{"text":"lunch"}],"alignment":"Left","lineLevel":0,"isChecked":true},{"id":"cl-yhXELRXSqb","type":"Line","style":"Paragraph","children":[{"text":""}],"alignment":"Left","lineLevel":0},{"id":"cl-vP6Sxdd-5b","type":"Line","style":"Paragraph","children":[{"text":"adding additional content"}],"alignment":"Left","lineLevel":0},{"type":"CodeBlock","id":"ecb-BnNdb3z4ol","lineLevel":0,"language":"PlainText","children":[{"id":"cl-BT9IL2wjlW","type":"Line","style":"Code","children":[{"text":"trying stuff"}],"alignment":"Left"}]},{"id":"cl-zVq46_cF7G","type":"Line","style":"H3","children":[{"text":"writing H3"}],"alignment":"Left"},{"id":"cl-mf3scInqXa","type":"Line","style":"Paragraph","children":[{"text":""}],"alignment":"Left","lineLevel":0}],"normalizationOpsQueue":[]}}
CheckboxListCheckboxListCheckboxListCheckboxListCheckboxListParagraphParagraphCodeH3Paragraph
CheckboxListCheckboxListCheckboxListCheckboxListCheckboxList
5
truetruetruetruetrue
3
row 3
calculating business case
study JSON
study JS
Open
{"type":"slate","root":{"children":[{"alignment":"Left","children":[{"text":"calculating business case"}],"id":"cl-grid-6wGfsPxNcz::i-HnFJoo4-LG::c-vL52NrhYBL-0","lineLevel":0,"style":"CheckboxList","type":"Line"},{"id":"cl-eBw-f6Zq1S","type":"Line","style":"CheckboxList","children":[{"text":"study JSON"}],"alignment":"Left","lineLevel":0},{"id":"cl-dJIk6Lmp7p","type":"Line","style":"CheckboxList","children":[{"text":"study JS"}],"alignment":"Left","lineLevel":0}],"normalizationOpsQueue":[]}}
CheckboxListCheckboxListCheckboxList
CheckboxListCheckboxListCheckboxList
3
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.