View Single Post
A found a better way is to sort as you add them... See below...

tell application "OmniOutliner Professional"
tell front document
display dialog "Enter new Assigned..." buttons {"Cancel", "Add"} default button 2 default answer "" with title "Assigned"
if button returned of result is "Add" then
set theAssigned to text returned of result
if exists (enumerations of column "Assigned" whose name contains theAssigned) then
display dialog "This Assigned Name Already exsists"
else
set enumcount to count of enumerations of column "Assigned"
set x to 1
repeat until x = enumcount
if theAssigned < the name of enumeration x of column "Assigned" then
make new enumeration at after enumeration (x - 1) of column "Assigned" with properties {name:theAssigned}
exit repeat
else
set x to x + 1
end if
end repeat
end if

end if

end tell
end tell