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)
-   -   Unable to FIND text in columns that have the type property set to "pop-up list" (http://forums.omnigroup.com/showthread.php?t=23371)

qomni 2012-02-01 09:27 PM

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]

RobTrew 2012-02-02 01:06 AM

[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]

qomni 2012-02-02 10:51 AM

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]

rogbar 2012-02-02 12:57 PM

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.

rogbar 2012-02-02 03:11 PM

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?

RobTrew 2012-02-02 03:28 PM

Good idea :-)

Amended above to expand the path to matching rows.

rogbar 2012-02-02 03:35 PM

Awesome. I cannot begin to explain how much this helps me.

Many thanks.

RobTrew 2012-02-02 03:50 PM

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).

RobTrew 2012-02-02 03:53 PM

[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] ?

rogbar 2012-02-02 06:07 PM

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.


All times are GMT -8. The time now is 11:49 AM.

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