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 > OmniFocus > OmniFocus 1 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
View a parent folder of a project Thread Tools Search this Thread Display Modes
I searched for a certain term and found a project that I don't know in which folder it is and I want to find out the name and place of that folder. How do I do that? I don't see any folder info in "inspect"...
 
Choosing 'Group by Folder' from the View Bar would be one option.
 
(and if you don't want to disturb the state of your view, and folder-tracking seems to be a regular issue, then you can always reach for the universal duct tape, and install a simple applescript button on your toolbar - sth like this):

Code:
property pTitle : "Show folder path"
property pVer : "0.02"

tell application id "OFOC"
	tell front document window of front document
		repeat with oPanel in {content, sidebar}
			set lstValue to value of (selected trees of oPanel where class of its value is project or class of its value is task)
			if length of lstValue > 0 then exit repeat
		end repeat
		if length of lstValue < 1 then return
		display dialog my FolderPath(first item of lstValue) buttons {"OK"} default button "OK" with title pTitle & "  ver. " & pVer
	end tell
end tell

on FolderPath(oNode)
	set str to ""
	tell application id "OFOC"
		set oParent to container of (containing project of oNode)
		repeat while class of oParent = folder
			set str to name of oParent & ":" & str
			set oParent to container of oParent
		end repeat
	end tell
	return str
end FolderPath
 
RobTrew, thank you!
 
I prefer a slight modification to Rob's script, which prints the name of the project as well. This allows one to run it with just an action selected and get the full name, useful in cases where you don't have the project name displayed.

Code:
property pTitle : "Show folder path"
property pVer : "0.03"

tell application id "OFOC"
	tell front document window of front document
		repeat with oPanel in {content, sidebar}
			set lstValue to value of (selected trees of oPanel where class of its value is project or class of its value is task)
			if length of lstValue > 0 then exit repeat
		end repeat
		if length of lstValue < 1 then return
		display dialog my FolderPath(first item of lstValue) buttons {"OK"} default button "OK" with title pTitle & "  ver. " & pVer
	end tell
end tell

on FolderPath(oNode)
	set str to ""
	tell application id "OFOC"
		set oParent to container of (containing project of oNode)
		repeat while class of oParent = folder
			set str to name of oParent & ":" & str
			set oParent to container of oParent
		end repeat
		set str to str & name of (containing project of oNode)
	end tell
	return str
end FolderPath
 
Very helpful. I'd also vote for a context menu (control-click) item along the lines of "show parent" or "show containing".
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
View Parent action in Context view alexisvx OmniFocus 1 for Mac 7 2013-07-11 03:43 PM
folder view showing actions grouped by project igrok OmniFocus for iPhone 0 2008-11-19 09:26 AM
Navigating to parent folder or project peterlemer OmniFocus 1 for Mac 0 2008-08-28 03:00 PM
Feature Request: Move project from folder to folder jbarr OmniFocus for iPhone 2 2008-07-17 11:10 AM
Context view and Parent/Children Actions apeman88 OmniFocus 1 for Mac 2 2008-07-02 06:35 PM


All times are GMT -8. The time now is 08:31 AM.


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