Unable to FIND text in columns that have the type property set to "pop-up list"
[INDENT]Batch search is great. And I like OmniOutliner auto-hoists a clicked individual result (a listed section).
But neither Batch search nor Find will locate text in "pop-up" columns! Search/Find work as expected if I set the column type to Rich Text. Please don't tell me that choosing the Rich Text column type is a necessary step. Once again I find the "OmniOutliner-3.0-Manual.pdf" anemic—this time on the topics of Find, Search and Pop-up: I only see seven references to Pop-up list in the 3.0 User Guide, and none mention anything about pop-up columns being excluded from Search and Find. Since my adoption of OmniOutliner I've always felt that its documentation is surprisingly sparse for such a great product. And sorry to say, the built-in in Help system is even less helpful and less navigable that the User Guide. I'm using OOpro 3.10. The Help menu does not provide a URL for the latest User Guide. (A reply in another thread hinted of a more recent User Guide. That would be wonderful, particularly if it covers topics more completely!) Thanks! qomni[/INDENT] |
[QUOTE=qomni;106870]neither Batch search nor Find will locate text in "pop-up" columns[/QUOTE]
That is, unfortunately, a limitation of the way in which search is implemented in oo3. The key move, in such cases, is to send of a quick email through the [B]Help > Send Feedback ...[/B] item in the OO3 menu. In the meanwhile (and in the spirit of Rube Goldberg) a script which found strings regardless of column type might look something like this: [CODE]property pTitle : "Find string in any column" property pVer : "0.5" property pTerm : "" -- ver 0.5 Double quotes specify an exact match. e.g. "checked" vs checked (the latter finds *all* rows if there is a checkbox column) on handle_string(strTerm) set pTerm to strTerm MatchRows(pTerm) end handle_string on run tell (display dialog "Find:" default answer pTerm buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" with title pTitle & " ver. " & pVer) set pTerm to text returned end tell MatchRows(pTerm) end run on MatchRows(strTerm) set blnExact to (strTerm begins with "\"") and (strTerm ends with "\"") if blnExact then set strTerm to text 2 thru -2 of strTerm tell application id "OOut" set oDoc to front document tell oDoc set lstSeln to {} if blnExact then repeat with oCol in columns set end of lstSeln to (rows where (value of (cell id (id of oCol))) = strTerm) end repeat else repeat with oCol in columns set end of lstSeln to (rows where (value of (cell id (id of oCol))) contains strTerm) end repeat end if end tell set lstSeln to my FlatList(lstSeln) if lstSeln ≠ {} then -- ENSURE THAT THE PATH TO THE MATCHING ROWS IS EXPANDED repeat with oSeln in lstSeln set expanded of (ancestors of oSeln) to true end repeat select lstSeln else display dialog pTerm & " not found in " & (name of oDoc) buttons {"OK"} default button "OK" with title pTitle & " ver. " & pVer end if activate end tell end MatchRows on FlatList(lst) if class of lst is not list then {lst} else if lst ≠ {} then FlatList(item 1 of lst) & (FlatList(rest of lst)) else {} end if end FlatList[/CODE] |
Thanks Rob!
The script you posted is helpful. It highlight/selects all rows with the search term. Ideally I'll want to find, and then find next, so maybe I'll tinker with the script. Much appreciated! qomni [QUOTE=qomni;106870] ... neither Batch search nor Find will locate text in "pop-up" columns! [/QUOTE] [QUOTE=RobTrew;106879] That is, unfortunately, a limitation of the way in which search is implemented in oo3. In the meanwhile (and in the spirit of Rube Goldberg) a script which found strings regardless of column type might look something like this: [CODE]property pTitle : "Find string in any column" property pVer : "0.2" property pTerm : "" tell (display dialog "Find:" default answer pTerm buttons {"Cancel", "OK"} default button "OK" cancel button "Cancel" with title pTitle & " ver. " & pVer) set pTerm to text returned end tell tell application id "OOut" set oDoc to front document tell oDoc set lstSeln to {} repeat with oCol in columns set end of lstSeln to (rows where (value of (cell id (id of oCol))) contains pTerm) end repeat end tell set lstSeln to my FlatList(lstSeln) if lstSeln ≠ {} then select lstSeln else display dialog pTerm & " not found in " & (name of oDoc) buttons {"OK"} default button "OK" with title pTitle & " ver. " & pVer end if activate end tell on FlatList(lst) if class of lst is not list then {lst} else if lst ≠ {} then FlatList(item 1 of lst) & (FlatList(rest of lst)) else {} end if end FlatList [/CODE][/QUOTE] |
Thanks Rob. Once again, you've written a script that really extends OO for me. I've long been frustrated by the inability to filter a view by columnar data. While this script doesn't actually filter the view, by highlighting every item with the search string, it's a good 2nd best solution for me.
Up till today, I've been creating "Tags" in a separate column, and then using the Utility Drawer search function to search for them. The Tags column had to be a text column, not a drop-down list, as OO's search function wouldn't search for values in a drop-down list. This is major for me. Using a drop-down list is a real improvement for me, as it means I don't have to type the same Tags in each time (and don't have to make sure the spelling is exact) ... I just choose the desired Tag from the drop-down list and it gets entered properly. Many, many thanks. |
Okay, I've discovered a hitch - the script finds a search string only if the item is visible, that is, it's not a child item hidden from view beneath a collapsed parent. Is there any way that the script could be adapted to expand any parent items it needs to in order to reveal the child items which contain the search string?
|
Good idea :-)
Amended above to expand the path to matching rows. |
Awesome. I cannot begin to explain how much this helps me.
Many thanks. |
Good :-)
FWIW I've also added LaunchBar parameter handling. (Choose the script with a LaunchBar abbreviation, tap the space-bar, and enter a search string). |
[QUOTE=rogbar;106907] I've long been frustrated by the inability to filter a view by columnar data.[/QUOTE]
I presume you've seen the other [URL="http://forums.omnigroup.com/showthread.php?t=16392"]filtering scripts[/URL] ? |
I did - but since the filtering script doesn't show parent items, I prefer the highlighting script. By seeing the context the highlighted item is in, I know exactly what it is.
|
I've simply added the script as an icon on my toolbar, and invoke it with one mouse-click from there.
|
[QUOTE=rogbar;106926]I've simply added the script as an icon on my toolbar, and invoke it with one mouse-click from there.[/QUOTE]
Short of using LaunchBar is there a way to invoke Applescripts from within OmniOutliner, perhaps via a keystroke? Rogbar, is the toolbar you referred to part of Omni, LaunchBar, or MacOS? Sadly, since I dropped QuicKeys I haven't used any any macro application, not even Automator. (Seemed like the QuickKeys people had significant trouble keeping pace with OS changes, and when I discoverer that my last update imported only the simplest macro in my QuicKeys library I bailed for good.) Thanks! qomni |
In OO's menu bar, go to View / Customize Toolbar, and you'll see all the icons you can drag up to your toolbar. Included among them, are icons for any AppleScripts stored in your ~/Library/Scripts/Applications/OmniOutliner Pro folder.
(And FWIW, I'm still using QuicKeys without any problems under 10.7.3.) |
[QUOTE=qomni;106928]Short of using LaunchBar is there a way to invoke Applescripts from within OmniOutliner, perhaps via a keystroke?
[/quote] The Script menu can be enabled via Applescript Editor's preferences, or you can use something like [URL="http://www.red-sweater.com/fastscripts/"]Fastscripts[/URL]. [quote] Rogbar, is the toolbar you referred to part of Omni, LaunchBar, or MacOS? [/quote] I'm not Rogbar, but he's referring to the bar of buttons that goes across the top of your OmniOutliner window. Probably reads "Utilities Action Add Column Attach Inspect" if you've still got the default set. |
[QUOTE=rogbar;106929]In OO's menu bar, go to View / Customize Toolbar, and you'll see all the icons you can drag up to your toolbar. Included among them, are icons for any AppleScripts stored in your ~/Library/Scripts/Applications/OmniOutliner Pro folder.[/QUOTE]
Hmmm. I looked in the library folder (both system and user). I see Scripts/Applications, but don't see a folder therein entitled OmniOutliner Pro folder. Is Omni supposed create that folder ... or am I? (And FWIW, I'm still using QuicKeys without any problems under 10.7.3.)[/QUOTE] That's good to hear! I think my QuicKeys shortcuts became unimportable when we jumped for OS9 to OSX. Did you have the same problem? It was going to be like starting from scratch. I mainly used QuicKeys in a music notation application; and it simultaneously (finally!) got lots of good keystrokes, so I begged off of macro-mania.) Thanks! qomni |
I'm personally finding that Keyboard Maestro has some key advantages over other launchers:
[LIST=1][*]Simple HUD's - if you group your macros for a particular application into sets of 9 or less, and assign them all the same keystroke in KM5, a little list of their names will pop up when you use that keystroke in that application. You can make the subchoice with keys 1-9,[*]richer dialogs than Applescript's [I]Choose list[/I] and [I]Display dialog[/I] - multiple fields and buttons,[*]its own variables and flow-control structures.[/LIST] (Greg Jones gives an [URL="http://forum.devontechnologies.com/viewtopic.php?f=2&t=13408"]example[/URL] of DevonThink to OO3 cross application use). [COLOR="White"]--[/COLOR] |
[QUOTE=whpalmer4;106932]The Script menu can be enabled via Applescript Editor's preferences, or you can use something like [URL="http://www.red-sweater.com/fastscripts/"]Fastscripts[/URL].[/QUOTE]
Are you referring to AppleScript>Preferences>General>Show Script in menu bar? I have that turned on, but would like something more direct, like you've suggested below. [QUOTE=whpalmer4;106932]I'm not Rogbar, but he's referring to the bar of buttons that goes across the top of your OmniOutliner window. Probably reads "Utilities Action Add Column Attach Inspect" if you've still got the default set.[/QUOTE] I think I'll have to figure this part out ... after loading the scripts installed in the proper folder? Presently I've located them in MacintoshHD/Library/Scripts/"folder of my naming" ... and they show in the Applescript menu of my mainmenu bar. |
That's .../Library/Scripts under the root.
For the toolbar, and more general use, you should put scripts in the .../Library/Scripts under your user account. [B]Finder > Go > Go to folder > ~/Library/Scripts/Applications[/B] (Where ~ is a system-recognised abbrevn for your home directory) Place oo3 scripts in the relevant sub-folder of ~/Library/Scripts/Applications |
Hi Rob,
Just noticed this script does not seem to work in OO4. Any chance of adapting for 4? Thanks ... |
[QUOTE=rogbar;128579]Just noticed this script does not seem to work in OO4. Any chance of adapting for 4?[/QUOTE]
In the current build of OmniOutliner 4, the Find panel and Search sidebar can find values in columns of any type, not just text columns. |
Thanks, Ken - that's a VERY nice feature. The ability to search for values from a column's drop-down list makes that column a lot more usable.
Now if only there were a way to filter the outline based on those columnar values ... |
All times are GMT -8. The time now is 10:08 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.