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 |
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] |
Amended (above) to add a [CLEAR] option.
|
Thanks Rob, I'm going to try that!
|
All times are GMT -8. The time now is 12:47 AM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.