The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Today's Posts

 
Hierarchical List of Cells Matching a Condition Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Hi all,

I am trying to use OmniOutliner to manage a product backlog for a project plan. I've created an outline with a hierarchical list of topics, owners, sprint due, and some other columns. I am trying to write an AppleScript (well, really a Python script using appscript to interface with the AppleScript API) that allows me to print a filtered version of the outline to a text file. It appears there is a way to easily filter for a list of rows directly using something like this Python code:

te.documents[2].rows.cells[its.value.contains("Bob") or its.value.contains("Steve") or its.ancestors()].value()
[[u'Bob, Steve'], [], [], [u'Bob, Rich, Steve, others'], [u'Bob, Rich, Steve, others']]


But what I really want is to get a list of rows in a parent-child relationship so I can print the any portion of the hierarchy where the search terms appear anywhere at a given level or below. So:

1. Top topic
1.1 Foo | Andy
1.2 Bar | Joe
2. Second topic
2.1 foobar | Bob
2.1.1 abc
2.2 blah | Robin

If I search for "Bob", I want to see:

2. Second topic
2.1 foobar | Bob
2.1.1 abc

Is something like that possible using AppleScript? Or am I limited to just getting a list of matching rows with no hierarchy? I have searched through these forums, AppleScript documentation, Google, and Safari Books Online. I'm new to this type of scripting (but not programming in general), and may be missing something obvious. I did find a few scripts in this forum that filter a doc based on a search string, but they don't seem to keep the hierarchy intact. Any help would be greatly appreciated.

The solution I'm converging on now is to make a tree in Python that I manage myself, prune the tree based on a search, and finally print the pruned version of the tree.

Thanks,

JL
 
 




Similar Threads
Thread Thread Starter Forum Replies Last Post
Completion Cells leanda OmniFocus 2 for Mac (Private Test) 1 2013-04-08 09:17 PM
Selecting projects from a hierarchical list Stephen Brown OmniFocus for iPad 5 2012-09-03 08:50 PM
Merging Cells ktozawa OmniGraffle General 2 2011-04-29 12:52 PM
Merge cells in a row sauron93 OmniOutliner 3 for Mac 0 2009-03-05 03:22 PM
Bug or feature?: Non-matching items eronel OmniFocus 1 for Mac 8 2007-11-26 05:38 PM


All times are GMT -8. The time now is 03:49 PM.


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