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)
-   -   How can I set the value of a cell for multiple rows? (http://forums.omnigroup.com/showthread.php?t=21949)

richardk 2011-08-23 02:59 AM

How can I set the value of a cell for multiple rows?
 
I'd like to set the value of a cell for multiple rows at once (in this case the cells are of the pop-up list type).
Any suggestions?

The only threads I could find where these:[LIST][*][URL="http://forums.omnigroup.com/showthread.php?t=1121"]from 2006, unanswered[/URL][*][URL="http://forums.omnigroup.com/showthread.php?t=8226&highlight=set+multiple+rows"]from 2008, feature request[/URL][/LIST]
Thanks

RobTrew 2011-08-23 04:09 AM

A rough outline of the kind of script that would do this for a document with just one popup column:

[CODE]property pTitle : "Set popup value of selected rows"
property pClear : "[CLEAR]"

tell application id "OOut"
tell front document
-- LOOK FOR A POPUP COLUMN
try
set colPopup to first column where type = popup
on error
display alert "No Popup column found"
return
end try

-- INVITE THE USER TO CHOOSE A POPUP VALUE (OR TO CLEAR THE VALUES)
set lstOptions to (name of enumerations of colPopup) & pClear
set varChoice to choose from list lstOptions with title pTitle default items item 1 of lstOptions
if varChoice = false then
return
else
set varChoice to first item of varChoice
end if

-- APPLY ANY CHOICE TO ALL THE SELECTED ROWS
if varChoice = pClear then set varChoice to missing value
set (value of cell id (id of colPopup) of selected rows) to (varChoice)
end tell
end tell
[/CODE]

RobTrew 2011-08-23 11:36 AM

Amended (above) to add a [CLEAR] option.

richardk 2011-08-24 12:23 AM

Thanks Rob, I'm going to try that!


All times are GMT -8. The time now is 08:40 PM.

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