The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniOutliner 3 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=9)
-   -   Checkbox summary (http://forums.omnigroup.com/showthread.php?t=16598)

imlad 2010-06-26 10:37 AM

Checkbox summary
 
I am just starting to use OO. I am using it to track household chores, with rows representing chores and columns representing days of the week. I use checkboxes to indicate that a chore was completed. When I turned the column summary on, I can see that if any box in a column was checked, I get an indication to that effect. Ideally, I would like to see not only the fact that there was at least one check, but how many there were. I assume that if I make the column a number column and put 1 instead of a check, the summary will give me the right result, but I was wondering if I could accomplish this with the checkboxes.

Thanks!

Daniel.

RobTrew 2010-06-26 01:37 PM

[QUOTE=imlad;79236] I would like to see not only the fact that there was at least one check, but how many there were[/QUOTE]

It would be worth requesting a 'numeric' summary type for checkbox columns through Help > Send Feedback in the OO3 menu.

In the meanwhile, as you suggest, only a numeric column (using digits in lieu of checkboxes) will give you an automatic numeric summary.

If you really want to use check-boxes you could install a script on your 003 toolbar to update numeric counts of checkboxes in an adjacent numeric column, but you would have to click the script every time you wanted to update the numbers - probably not ideal ...

(Such a script might look something like the following)

[CODE]property pstrSummaryCol : "CheckSums"

tell application "OmniOutliner Professional"
set oDoc to front document
tell oDoc
-- Get a reference to the first checkbox column
set colCheck to first column whose type is checkbox
if colCheck is missing value then return
set idCheck to id of colCheck

-- Get a reference to a CheckSums column (creating it if necessary)
set refCols to a reference to columns
if not (name of (refCols) contains pstrSummaryCol) then ¬
set oCol to make new column at end of columns with properties {name:pstrSummaryCol, type:number}
set oCol to first column whose name is pstrSummaryCol
set format string of oCol to "0"
set idSum to id of oCol

-- Count checked boxes and update the sums for each parent row
set lstTopParents to (rows of oDoc where (level is 1) and has subtopics is true)
repeat with oRow in lstTopParents
my CountChecks(oRow, idCheck, idSum)
end repeat
end tell
end tell

-- Count the checks, and write (sub)totals to the CheckSums column of any parent rows
on CountChecks(oRow, idCheck, idSum)
using terms from application "OmniOutliner Professional"
tell oRow
if has subtopics then
set lngChecks to 0
repeat with oSubTopic in children
set lngChecks to lngChecks + (my CountChecks(oSubTopic, idCheck, idSum))
end repeat
set value of (cell id idSum) to lngChecks
lngChecks
else
if (value of cell id idCheck) is "checked" then
1
else
0
end if
end if
end tell
end using terms from
end CountChecks

[/CODE]

imlad 2010-06-27 05:11 AM

Thanks!
 
RobTrew, thank you very much!


All times are GMT -8. The time now is 01:28 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.