Quote:
Originally Posted by hypnosimon
Thanks for the quick response
|
Using applescript to create a duplicate document, containing only the rows which match some criterion, is fairly straightforward. The key code might look something like this:
Code:
tell application id "com.omnigroup.OmniOutlinerPro3"
-- get a reference to the selected document
set docFront to front document
-- filter the rows using a WHERE statement
-- e.g. Check box
-- set refRows to a reference to (every row of docFront where state is checked)
-- OR main text of row
-- set refRows to a reference to (every row of docFront where topic contains "action")
-- OR a text column
-- set refRows to a reference to (every row of docFront where text of cell 3 contains "action")
-- OR the value of a pop-up box
-- (Cell 1 is the check-box, Cell 2 is the topic, Cell 3 the 1st user-defined column ...)
set refRows to a reference to (every row of docFront where value of cell 3 is "Joe")
-- duplicate the filtered rows to a new blank document
set docFiltered to make new document with properties {name:"FILTERED"}
duplicate refRows to the end of the children of docFiltered
end tell
--