Title: Re: Ent X: Script to put a ' ' (blank) in any records lacking a name
On 9/9/03 6:41 PM, "David Morganstein" <[EMAIL PROTECTED]> wrote:

> Could someone suggest a script I could run that would insert a ' ' (blank)
> in the name field of any record that has no first and last name entry (eg, a
> company name only record).
>
> Or is there an easier way to get Ent X to do this?
>
> (This is a potential solution for the Hot Sync failure...it's been suggested
> that the incorrect sort is due to the lack of a first and/or last name entry
> for company only records).

Entourage trims empty spaces at the beginning or end of any entry, including First Name and Last Name. It thus also removes them if they are the only character, too. Try it with any contact - you'll see. Doing it by script wouldn't help - Entourage would remove them anyway.

However that is not the case with option-space: those are retained, and look just as blank to you or I.

I can't imagine you need option-space for both last name and first name - just last name will do. Probably all these contacts would bunch together at the bottom (instead of at the top, as in Entourage):

--------------------------

set optionSpace to ASCII character 202
tell application "Microsoft Entourage"
    set last name of (every contact whose first name = "" and last name = "") to optionSpace
end tell
beep
display dialog "All done!"

---------------------------

It's not impossible that Palm OS will convert the option-space to a regular space - which would probably sort OK in Palm but may sync back as a "duplicate" with regular sace, which Entourage will then remove. You'd then have quasi-duplicates in Entourage, and on the next sync after that the new space-less contacts would also sync to Plam where they'd be out of order again.

I'm not sure that would happen, but it might. If so you'd be better having the last name as "-" or ".", which will put them at teh top in both apps:

--------------------------

tell application "Microsoft Entourage"
    set last name of (every contact whose first name = "" and last name = "") to "-"
end tell
beep
display dialog "All done!"

---------------------------


But frankly, if I were you, I would set the Last Name to the company, so they will all sort alphabetically in both apps. It will take a little longer, but big deal:

--------------------------

tell application "Microsoft Entourage"
    set noNames to (every contact whose first name = "" and last name = "")
    repeat with i from 1 to (count noNames)
        set noName to item i of noNames
        set theCompany to company of noName
        if theCompany  ≠ "" then
            set last name of noName to theCompany
        else
            set last name of noName to "-"
        end if
    end repeat
end tell
beep
display dialog "All done!"

---------------------------

--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: http://www.entourage.mvps.org/toc.html

PLEASE always state which version of Entourage you are using - 2001 or X. It's often impossible to answer your questions otherwise.

--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: http://www.entourage.mvps.org/toc.html

PLEASE always state which version of Entourage you are using - 2001 or X. It's often impossible to answer your questions otherwise.



--
Paul Berkowitz
MVP Entourage
Entourage FAQ Page: http://www.entourage.mvps.org/toc.html

PLEASE always state which version of Entourage you are using - 2001 or X. It's often impossible to answer your questions otherwise.

Reply via email to