Applescript to batch edit contact information

I am using Contacts to manage my addresses. Till not I was using the "Department" field and the "Notes" field to enter Notes to all my Contacts. However, my new Phone does not support syncronizing the "Department" field and I need that information on my phone.
Can someone help me with a script that will add the Information from the "Department" field to a separate line to the "Notes" field?

tell application "Contacts"
          repeat with aperson in people of group "group name"
                    if department of aperson is not missing value then
                              set theDept to department of aperson
                              set the note of aperson to note of aperson & return & theDept
  -- the next line is optional. Remove it if you don't want to delete the department field
                              set department of aperson to missing value
                    end if
          end repeat
  save
end tell
As stated in the comment, remove the "set department" line if you don't want to delete the department field, just move it.
Edit the group name as appropriate, or for all contacts, remove [of group "group name"]

Similar Messages

  • Edit contact information in hotmail.

    When I click on my name as a sender or recipient in hotmail all of my personal contact information is visible including my birth date. I have clicked edit but it won't allow me to remove my birthdate. Can anyone tell me how to do this? Is this information available to everyone I send an email too?

    Dear Praveen,
    Thanks for the information. I have been looking around for the options in configtool and user adminstration with in portal, but never realised we need to go to user management from index.html
    Thanks again and points are alloted.
    Regards,
    Sreeram

  • What's the best way to resolve duplicate contacts and batch edit?

    Hi.
    I need some advice. I want to consolidate my contacts, remove duplicates, add tags, and then sync them across applications (Addresbook, Gmail, Yahoo Mail, etc.) going forward. I'm finding many challenges and it seems there's not an easy way to do it.
    Addressbook
    * will not let you go through and review/edit/approve how it resolves duplicates
    * manually finding/fixing duplicates is tedious - there's no drag and drop from one contact to the other
    Yahoo Mail
    * will let you review/edit duplicates
    * has a tedious interface and requires importing/exporting files
    * when adding a new contact doesn't always let one add a group
    * no longer has a "find new contacts" feature that would auto populate new cards - so anyone's address that I rely on auto-fill from recent will not have a card yet
    Gmail
    * I don't have any contacts there yet.
    Palm
    I originally had all my contacts in Palm and there's a lot of old "X-Palm-Category1:" etc in the notes, which actually make good tags, but are hard to edit to something like "tag:business". I can if necessary try to use Palm desktop 4.
    Bento
    I have Bento 3 and I've tried using it to clean up some of my Addressbook contacts and start "tagging" my contacts to make searching easier. The problem there is that I can't find a way to batch process contacts. I also can't seem to add line breaks in the notes. So in Addressbook I can add  tag:123 and tag:456 on separate lines, but not in Bento so any AB card edited in Bento shows it as tag:123 tag:456 on one line
    Excel 2004
    I have exported most of these contacts into Excel spreadsheets. (Bento will export the Apple AB into a spreadsheet). Attempting to compile and clean data in spreadsheets has it's own set of issues. In particular, the data are not laid out in columns that can be easily copy pasted into one template. For example, Yahoo contacts allow the label for the phone number to vary for the phone column instead of putting home, work, fax, and mobile numbers in separate columns.
    iPhone 4
    I also have an iPhone but it oddly enough doesn't display any smart groups, and it doesn't even display the phone's default "unsorted" folder. I can only find a new contact added from the phone after syncing it back to the MBP and looking in a smart folder I made for it.
    Other than hiring a data entry temp to fix this as a project, can anyone think of something that I could use/do to make this easier?
    I would appreciate any and all suggestions.

    I found out I sometimes have three or even four versions of the same file.
    How did you find that out?

  • Editing imported CSV contact information?

    Hello, I have been searching everywhere and cannot find an answer, my guess is that Skype isn't smart enough to do this but figured I would ask...
    I am able to edit contacts that were added from Facebook and those that I have found through Skype, that is not my issue. My issue is that I have imported my contacts as a CSV file from my address book and those contacts, I cannot edit. When I right click on a name of a facebook contact it give me the option to View Profile and then Add Phone Number. If I right click a CSV added contact I can View Profile but CANNOT ADD PHONE NUMBER. 
    I am using the latest version 7.4.0.102, just checked the update. Any suggestions? All I want to do is edit/add  numbers to contacts. It would also be nice to delete some of the contacts as well (I can delete those that are facebook contacts)... 

    I have tried that, however, as it is not a song that I downloaded with iTunes (I had it in my music folder on my C: drive), the area is blocked out in grey so does not allow me to edit the information.
    Any other ideas I could try?

  • Looking for a howto for an applescript to batch convert PPTS to Keynote...

    Looking for a howto for an applescript to batch convert PPTS to Keynote...
    Hi to group!
    (cross posted this a couple of weeks ago to Keynote forum, no responses) Perhaps the query really belongs here...)
    (I) Have a whole bunch of PPTs to convert to Keynote, now and more as time goes on.
    Looked into applescript to try to automate this a bit (could open PPT file but did not see any way to 'Save' file from a script).
    Also looked into bash scripting/automator too -- way too many options to choose from. Help!
    Anybody done anything similar to this already?
    TIA for pointers. //GH

    A word of caution.
    I have not tried the workflow before.
    I am not an applescript expert.
    These steps were quickly composed using my basic knowledge in Applescript
    What I was planning was to create a script droplet that when a ppt file is dropped upon it, it extracts the name of the file and sets it to a variable to name the keynote file later. You might have to modify it a bit to batch process multiple files.
    Try going through batch processing scripts made for quark or Adobe photoshop ( Not sure if these exist on internet) to see how they have implemented the steps in applescript.
    To GUI Script Keynote, do these steps...
    All the code has to go in here
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">activate application "Keynote.app"
    tell application "System Events"
       tell process "Keynote"
          -- insert GUI Scripting statements here
       end tell
    end tell
    </pre>
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">click menu item "Export…"  of menu 1 of menu bar item "File"  of menu bar 1</pre>
    This will click the next.. button provided the default export type is set to PPT
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">click button 2 of sheet 1 of window 2
    </pre>
    This will click the Export button on the next window
    click button 1 of sheet 1 of window 2
    This piece of code can be used to set the name of the ppt file using the extracted name in the first step
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; width: 720px; color: #000000; background-color: #E0E0E0; overflow: auto">set value of text field 1 of sheet 1 of window 2 to "<string>"
    </pre>
    May be there is a better way out there.
    Thanks for red_menace for his Script formatter script
    Message was edited by: dj9027

  • [BUG] Editing contacts with italian language set

    This behaviors happens only when WebOS is set to Italian language:
    1) when editing an existing contact, it shows up as a blank one, as if I was creating a new contact from scratch. Actually, the contact data is there, but somehow hidden! When changing it (so, actually, writing back from scratch), it does change, but can't see the original contents.
    2) When creating a new contact, I can't add a phone number, while I can add other items (email, address, URL, etc). Saving it and then editing it, goes back to point 1. Thus, the only way to save a phone number is dialing it, then saving it from the Phone app.
    I have an European GSM Pre, WebOS 1.4.1

    First, when you do create a new contact (in Italian), what happens when you try to type in the Phone Number field? Does the cursor appear, or is the field grayed out? Does nothing happen when you tap on the "+ New Phone Number ..." field?
    As long as I tap it, the field become dark grey, as it was somehow activated, but when I release my finger it comes back to normal and I can't type in it (no cursor).
    Besides that, I can add a new contact. Other fields are working fine, but in the Email address and IM address field, the cursor doesn't appear on the very left (beginning) of the field. It stays almost in the middle, as it's keeping room for a button, and actually if I click on the left, it pops up something like an empty list or menu. Besides this glitch, I can edit those fields.
    By the way, the phone number field is the only one that is 2 lines long (in italian). I don't know if this means something, but maybe this screws the interface up.....
    Second, what happens if you change your language selection from Italian to English, then try to edit an existing contact? Are you able to see existing text then?
    Yes; it works perfectly.
    Also, try creating a new contact with your language selection set to English. Are you able to enter a phone number at that point? How about editing a contact created with language set to English while still set to English. Can you see existing data within the contact editing screen?
    Yes, everything works fine, as long as english (US) language is set.
    Next, switch back to Italian and view the contact created under English. Can you edit existing information without it blanking out?
    I can't see the existing information; I can't edit any phone number obviously, because the field can't be activated. If I try to overwrite data by writing on those field that I know they contain data, it doesn't work: name of the contact doesn't change, and editing the email address (ie. writing it back from scratch) adds another address.
    Hope this helps,
    Stefano

  • Editing Contacts via keypad causes OPERATION FAILE...

    Initially I entered info for approximately 60 contacts into my new Nokia 6131 phone memory using the phone keypad. Everything worked fine. Then I discovered the CONTACTS application in Nokia PC Suite software was a lot easier to use for data input, so I started to use that application via my PC to edit my contacts.
    Now, when I try to edit a contact using the phone keypad, I regularly get the OPERATION FAILED error, which prevents saving the revised contact information. This is EXTREMELY frustrating, because there is no indication of a cause for the error. 95 percent of the memory in my phone is free, so problem is not related to memory capacity. I can delete certain parts of contact info, like an extra phone number, or an image, and that seems to work without generating the error, but you cannot add or modify anything. I can only reliably edit my contacts using PC suite and then synchronizing the changes. I have updated PC suite and the phone firmware to the latest available versions, but that didn't help. DOES anyone know what causes this OPERATION FAILED error?

    Thank you miksu,
    Yes, my phone UI is idle when I try to browse/edit contacts. Today, I thought I'd try resetting factory settings and see if that cleared the problem. So I backed up the phone, reset factory settings and tried to restore from the backup - disaster, it would not restore contacts at all and I was left with a phone minus 400+ contacts! I tried backups that I had previously restored successfully from - still no go.
    So I rebuild the contacts from my Outlook, compared it manually with what I had on my old 6230 (fortunately I still have the phone with contacts intact), made updates manually and all is now OK. The OPERATION FAILED does not appear on the phone and I can browse/edit my contacts on the PC.
    Although everything is fine now, I will use PC Suite with caution. Perhaps my understanding of the product is not good enough, but I am not keen on risking it.
    Sharad

  • No New Contact Information

    Brief History:
    1. First sync with iBook went fine, everything synced.
    2. Edited AddressBook information.
    3. Synced again, says it synced contacts, no information on Touch wasn't updated.
    4. Noticed that iTunes wasn't pulling updated groups for the iPod Touch options (as in, which groups to sync and what group to put contacts into when created on the Touch)
    5. Thoroughly stumped.
    6. Any ideas? I bought this as a PDA (only need calendar and contacts) so I am pretty desperate to get the contacts working.
    I am running the most up to date of everything (10.5.2., latest iTunes, latest Touch software).
    Message was edited by: Elkanah

    Hello, and Welcome to Apple Discussions!
    In the info pane for your iPod, make sure that syncing contacts is actually enabled.
    Hope this helps.

  • Trying to add Contact information through Oracle Data Loader

    Hi,
    I have checked Oracle On Demand guide PDF and can able to insert a valid account data on oracle on demand via client batch pgm. Can you tell me any valid Contact Map and contact*.csv file which can insert contact information on Oracle On Demand. If I get dealer , vehicle or any other that would also help. Where I can check the map details for all these record types. That is the biggest problem I am facing.
    Thanks in advance for your help !!!
    JD.

    I am able to inser a basic contact on Oracle On demand through Data loader. But it is getting partially completed with errors. The first Name, Last Name is getting inserted, but columns like Title , Address those are not getting inserted. Can you give me why it is behaving wierdly. The Map I found to be okie.
    Appreciate your reply...
    Thanks...

  • Find my friends contact information

    In Find My Friends I was presented with a button to add contact information. Unfortunately I selected the wrong contact. Now the name shown is incorrect but I see no way to edit or change it.

    I have the same problem except that all my contact locations shows up in either Korean or Japanese. I think this started to happen after a business trip to Shanghai. Now friends see my location in a foregin language instead of English. I have no idea were to reset it.

  • Where is Active Sync finding all my contact information

    No device
    I recently acquired a Palm Treo Pro, to replace my Treo 650. I have quite a few contacts stored on my 650 Treo, but they don't show up in my Outlook Contacts, and I have never been able to see any contacts in my Palm Desktop Address book. Anyhow, when I ran Active Sync, it pulled in all kinds of old contact information, and in many cases replicated many of the entries. What I would like to know is if anyone knows where it is picking up this information, and is there a way to edit it on my desktop, and then do another Active Sync, making the Desktop replace the handheld data. Any ideas or suggestions will be greatly appreciated.

    Amf
    You should make a back-up of your contacts on your computer anyway, regardless if you proceed.
    On my Macbook I go into Contacts> File> Export> Export Archive
    Cheers

  • Editing contacts in Backup Assistant

    I have 2 phones on my account.  Backup Assistant defaults to the primary line.  There must be a way to change to the secondary line to edit contacts on that line but i haven't found it.  Any suggestions?
    Thanks - Ron

    You will need to set up a seperate MyVerizon account for the second line to manage Backup Assistant for that phone.  Go to the MyVerizon login page and click the link to create a new account and use that phone's number.  The account will have limited access to account information (the total bill and that line's usage), and be able to manage BA and any media purchases for that line.

  • Keyword on import and batch edit

    I am having trouble loading keywords on batch edits and also on importing new files, the only way i can mange this so far is to maually type in keywords as opposed to picking from a selection from the keyword window hud which I would prefer?
    Thanks

    Kirby, I agree with all you say, but still I come to a different conclusion - forgive me
    I think, our workflows differ because we have different tasks to solve. I have import presets for the data that are to be applied to all images of the film roll, and that regularly requires some keywords to be set to all images. These keywords describe  things not covered by the EXIF and IPTC, but still apply to all images. For the majority of the keywords holds what you are saying - they are individual to each image and I set them later.
    For example, I regularly scan old slides. The NikonScan software assigns  "Nikon SUPER COOLSCAN 4000 ED" to the camera model, bt the images have been taken with other camera. So I like to set the the correct camera model in an import preset for each older camera I have used. And I prefer to store the camera data not in the text field - caption, etc, for these are volatile, I too ofen managed to erase them accidentally when batch chinging the title or comment information.
    Other general keywords describe the kind of experiment or other circumstances when making the images.  All keywords describing the kind of scene and the subjects vary and will be applied while browsing the images.
    What do you think?
    Cheers
    Léonie

  • Security questions have incorrect information how do I edit the information?

    Security questions have incorrect information how do I edit the information?

    How to reset your Apple ID security questions.
    Go to appleid.apple.com, click on the blue button that says 'Manage Your Apple ID'.
    Log in with your Apple ID and password. (If you have forgotten your Apple ID password, go to iforgot.apple.com first to reset your password with a password recovery email)
    Go to the Password & Security section on the left side, and click on the link underneath the security questions that says 'Forgot your answers? Send reset security info email to [email]'.
    This will generate an automated e-mail that will allow you to reset your security questions.
    If that doesn't work, or  there is no rescue email link available, then click on 'Temporary Support PIN' that is in the bottom left side, and generate a 4-digit PIN for the Apple Account Security Advisor you will be contacting later.
    Next, go to https://getsupport.apple.com
    (If you see a message that says 'There are no products registered to this Apple ID, simply click on 'See all products and services')
    Choose 'More Products & Services', then 'Apple ID'.
    A new page will open.
    Choose 'Other Apple ID Topics', then 'Forgotten Apple ID Security Questions'.
    Click the blue 'Continue' button.
    Select the contact option that suits your needs best.

  • Can I clone contact information to speed up the entry of new contacts?

    I go to meetings and get business cards from 8 people at the same company. Once I put one contact in, much of the contact information is the same. Is there a way to clone a contact so that I just have to edit the name, phone, and email address so I don't have to type it all in again?

    Drag an existing contact from the contact list of your address book to the desktop.
    Drag the resulting .vcf file back into the contact list.
    Choose to review duplicate.
    Choose to keep both.
    Choose to import.
    Edit the new contact.
    Have a nice day.

Maybe you are looking for

  • How do I share files between two Macs on my wireless network?

    I have an iMac G4 and an ibook G3 on a wireless network. I have "file sharing" activated on both computers. (Also Appletalk, which may or may not be a misguided move, but I got the idea from OSX "Help.") When I try to get from either computer onto th

  • Can you install itunes on more than one computer?

    Hi all, I want to install the software for my first-generation ipod mini on my friend's computer, but I heard somewhere that you can only install the software on one computer and obviously I also want to be able to use it with my own computer as well

  • Playbook Mini Keyboard

    I live in the UK and for over a year now I have been trying to buy a mini keyboard for my Playbook. Despite requesting this from Blackberry.co.uk website, I still have not had a response from them. Are they available here in the UK and if so,    wher

  • Difference between Oracle Discoverer and ReportsBuilder

    Hi Everybody, I have a question concerning the differences between the two reporting solutions offered by Oracle : Oracle Discoverer Desktop and Oracle Reports Developer. I am wondering if both of them support OLAP data, if they allow reports publish

  • Change the appearance of CMYK black (Illustrator, InDesign)

    This question was posted in response to the following article: http://help.adobe.com/en_US/creativesuite/cs/using/WS7E8089AA-F584-46b0-8E67-DAA2ED79BE4B. html