Address Book Adds Carriage Return to Street Field on Import

I've been having some fun and games trying to import a large list of addresses in a tab delimited file into the Address Book. After finally managing to sort out all the issues with importing the file, I have now discovered that the value for the Street in all of the imported addresses has a carriage return (\r) character appended to them. There was not a carriage return present in the tab delimited file.
I doublechecked the Address Book entries using Applescript to inspect the final character of the Street field and it was indeed a carriage return.
I presume that this is due to the mapping of fields in the Address Book to the columns in my file. The Address Book allows you to enter 2 values for the Street, yet I am only using the first one with the second one being set to be ignored.
However, the import still adds the carriage return character despite the second Street field not being required. It's not obvious that this is happening when viewing entries in the Address Book, yet when it comes to printing the imported addresses onto labels, a blank line is left due to the empty second Street field.
If I edit the card and amend the Street field to, say, add a comma to the end of the Street or, take it away, the problem disappears. I don't want to manually edit all the imported address of which I have 275. Is there a workaround for this, or some Applescript that will automatically edit all the Street entries to remove the carriage return?
Is anyone else experiencing this? Could this be classified as a bug?
Before someone suggests I use the thirdparty Address Book Importer, I have tried that too and it also results in the same problem.
Stuart
Mac mini   Mac OS X (10.4.6)  

The blank line appears when looking at the addresses through applications like SOHO Labels and Envelopes or Imprint. The problem is that the carriage return is added by the Address Book as it is being imported, rather than the carriage return being there already, so loading the tab delimited file into a spreadsheet will not show any carriage return characters.
In the end I cooked up some Applescript to go through the Address Book and strip out any trailing carriage returns from the Street field for all addresses. I'm no Applescript guru, but the following seemed to do the trick:
tell application "Address Book"
set thePeople to every person
repeat with thePerson in thePeople
set theAddresses to every address of thePerson
repeat with theAddress in theAddresses
set streetinfo to street of theAddress
if streetinfo ends with "\r" then
set streetinfo2 to (text of characters 1 thru -2 of (streetinfo as string) as string)
set street of theAddress to streetinfo2
end if
end repeat
end repeat
save addressbook
end tell
The other alternative was to write a script to parse my file in something like Ruby and then use Applescript to add the records rather than use the Address Book import feature. That would probably have given me some flexibility with being able to add multi-line notes, but the above was quicker to hack together.
Stuart
Mac mini (PPC)   Mac OS X (10.4.6)  

Similar Messages

  • Add carriage return in XML file

    Hi,
    I found a topic that correspond to my requirement :
    [Add carriage return in XML file|https://wiki.sdn.sap.com/wiki/display/XI/HowtoappendCarriageReturnintheendofeachtagofxml+file]
    But i don't know where created this udf, which input parameter pass?
    Thank you for your help.

    Hi Frantzy,
    The link does not give enough explanation. What I am assuming is if you have xml string in one field then if you need to add new line after each tag then you can follow that.
    If you want a udf where you want to insert a new line use this udf:
    Create a Value UDF with one input argument 'a' and name the udf as addnewline. Then add this code:
    Imports: java.*;
    String lines;
    lines = "";
    lines = lines.concat(a + '\n' );
    return lines;
    Then where ever you want a new line just add this udf in your mapping. If you want a new line for 10 fields then you can put in all the 10 fields.
    Example:
    Source field --> logic --> udf (addnewline) --> target.
    So after logic if you have the value as 123 then in the target you will see 123 followed by a carriage return.
    Regards,
    ---Satish

  • Carriage Returns in Textarea field in APEX Mail

    Greetings all,
    I have a form that the users fill out and when they click submit it uses APEX Mail to send the contents to individuals in an HTML format. One of the fields is a text area where the individual will enter information like the sample below:
    First to Arrive:  Bob
    Second to Arrive: Jane
    Third to Arrive: Sandy
    Last to Arrive: FredWhen the email is received, instead of being on one line, each entry follows the next like:
    First to Arrive: Bob Second to Arrive: Jane Third to Arrive: Sandy Last to Arrive: Fred
    I posted about getting the form fields to show the carriage returns and that works fine. Now trying to figure out what to add to make sure that line breaks are handles as html breaks br tags. Any assistance and examples would be appreciated.
    Thanks
    Wally
    Edited by: wfsteadman on Feb 17, 2011 4:49 PM

    3.  Re: Carriage Returns in Textarea field in APEX Mail
           617301
    this code looks like it should work but doesnt,
    REPLACE(REPLACE(REPLACE(:TEXT_FIELD_ITEM,CHR(10)||CHR(13),'<br/>'),CHR(10),'<br/>'),CHR(13),'<br/>')
    ....thanks.

  • Remove carriage returns from a field in an oracle table

    I have a field that is defined as a LONG in my oracle table; the data contained in this field has carriage returns/line feeds (it's free form text); as i'm selecting data from this field, i need the carriage returns removed so that the data from this field all appears on one line.
    I tried using the TRANSLATE function to convert the carriage returns to something else, but that doesn't work.
    Example:
    Select comment from Notes:
    COMMENT
    the applicant called for an appointment;
    an exam was scheduled for 4/1/05 at 9am;
    called applicant to confirm app
    this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled for 4/1/05 at 9am; called applicant to confirm app"
    How can i do this? Can the decode function be used to remove the carriage returns in this field?

    when i used translate its giving correctly,
    SQL> ed
    Wrote file afiedt.buf
    1 select translate('the applicant called for an appointment;
    2 an exam was scheduled for 4/1/05 at 9am;
    3 called applicant to confirm app
    4 this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled
    5 How can i do this? Can the decode function be used to remove the carriage returns in this field
    6* ',' ') from dual
    SQL> /
    TRANSLATE('THEAPPLICANTCALLEDFORANAPPOINTMENT;ANEXAMWASSCHEDULEDFOR4/1/05AT9AM;CALLEDAPPLICANTTOCONF
    the applicant called for an appointment; an exam was scheduled for 4/1/05 at 9am; called applicant t
    SQL> ed
    Wrote file afiedt.buf
    1 select 'the applicant called for an appointment;
    2 an exam was scheduled for 4/1/05 at 9am;
    3 called applicant to confirm app
    4 this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled
    5* How can i do this? Can the decode function be used to remove the carriage returns in this field
    SQL> /
    'THEAPPLICANTCALLEDFORANAPPOINTMENT;ANEXAMWASSCHEDULEDFOR4/1/05AT9AM;CALLEDAPPLICANTTOCONFIRMAPPTHIS
    the applicant called for an appointment;
    an exam was scheduled for 4/1/05 at 9am;
    called applicant to confirm app
    this needs to be extracted as: "the applicant called for an appointment; an exam was scheduled for 4
    How can i do this? Can the decode function be used to remove the carriage returns in this field?
    SQL>

  • Address Book Server will not sync all fields with iOS client

    Hello,
    I am getting really frustrated with my Mac Mini Server.
    Apparently, the Address Book Server DOES NOT sync all fields.
    Only standard vCard-fields seem to synced.
    I have not successfully synced user-defined fields, such as an additional date.
    Any ideas / infos on how to achieve this if this possible at all?
    Thanks for the input,
    Erasmus
    One thing: I posted the same question in the "Lion" (non-server) discussion - sorry for any confusion.
    One thing I noticed:
    All changes made on the server in the OS X Address Book are distributed to two iOS clients (iPod 4th Gen iOS4 iPhone 3GS iOS 4).
    Any help is appreciated.

    Sorry for answering myself...
    I just found out that after editing the newly distributed entry on an iOS4-Client, some fields on the server are deleted!
    Erasmus

  • Does Address book has a Last Modified Date field?

    Hi
    Please can you let me know if Address book has a Last Modified Date field? I'd like to know what date I have last modified my address book records. I checked Preferences but not able to find it there.
    Thank you.

    Sorry, but there is no such field in Address Book. If you select an individual entry in Address Book, you will see to the lower-right an "Updated" field with the date that entry was last updated. This is not true for all entries, but nearly all. There seems to be a point after which you've entered text in the Note field that the "Updated" field will no longer appear when you select an entry, but it's not documented.

  • Address Book: Pop-up menus attached to field labels

    Some of these are grayed out when it doesn't make sense to me to do so. For example, with the Instant Messaging field label, I find iChat always grayed out, whereas it would appear to represent an opportunity to launch iChat while in Address Book. Ditto with the Email field label; while I can launch Mail, I can't open iChat, open my iDisk, or Send Update.
    Any clues as to why these choices are grayed out when it appears they should be usable?

    I finally worked out what the problem was: I had moved Address Book to a self-made sub-folder of my Apps folder, meaning that I was in fact running an older Panther version and not the newly-installed Tiger one. Only when I saw 2 icons in the dock did I realise what I'd done.
    Note to self - leave the OS installed Apps in the main folder in future...
    PowerBook G4 15 1.25GHz Mac OS X (10.4.5)
    PowerBook G4 15 1.25GHz

  • How do i import and sync my icloud / iphone contacts into address book on my macbook pro, how do i import and sync my icloud / iphone contacts into address book on my macbook pro

    HELP
    how do i import and sync my icloud / iphone contacts into address book on my macbook pro, how do i import and sync my icloud / iphone contacts into address book on my macbook pro
    Runnig 10.6.8 on a MacBook PRO.....

    The easiest fix if you're running Snow Leopard is to export all your contacts, then import them into something like google (I already had a gmail account), and then just use google to sync your contacts instead of icloud (via the sync with Google button in the address book settings).
    Its a bit sluggish to update, but it works well.  You can then point your iphone, and other iOS devices to use google for contacts too.
    If Apple don't want to look after their customers, other companies will gladly do so....

  • Dragging card from Address Book adds a row?

    I have a small table onto which I can drag client info from their Address Book card. This automatically populates other fields throughout my worksheet with the correct information.
    But when I do this, Numbers adds a new row to the bottom of that little table, which pushes other tables down the page. It did not used to behave this way, but I don't know what changed.
    Is it possible to lock the number of rows in a particular table?
    Or is there another way to make this work without Numbers adding a new row each time?
    Thanks.

    Thank you, Yvan. There is a blank row available into which I'm dragging the V-card. That's why I'm surprised it's adding a new one. I have checked to make sure it's actually blank, too. I can't see any content there at all. In my tests (if you check the link above) you'll see that I even created a completely new table in which to test this. And got the same (or weirder) results.

  • Place a carriage return in the field separator of an iChart

    In the Data Mapping of an iChart, the Field Separator is a good tool to obviously separate data.  The problem I see is the two fields and the separator are on one line.  How can I place a carriage return to place the two fields on separator lines?

    Hi,
    This is not possible to do; however, perhaps it could be entered as a feature request for a later version.
    Diana Hoppe

  • Converting Frame files to PDF adds carriage return in code snippets

    Our writing group is using FrameMaker 7.2 with Acrobat 9. The documentation we write includes code snippets. Conversion from Frame to PDF adds a carriage return to the end of any line of code. This causes any snippet containing a wrapped line to be incorrect if it is copied and pasted directly from the PDF.  Does anyone knopw if there's a fix for this?
    Thanks,
    George

    Dear Alexander,
    Thanks for the reply.
    In this I am using the FM 'CONVERT_ABAPSPOOLJOB_2_PDF'. I have checked the settings from SPAD that is also same in both servers for particular output device. But the patches are diffrennt in both the servers, the server from which layout is not coming properly having the high level patches in compare to the other server(which is working fine).

  • Serious Bug - Carriage Returns in Caption field

    LR for Windows does not handle Carriage Returns/Line Feeds correctly in the metadata Caption field.
    Windows Vista SP1, 32-bit
    Adobe Lightroom 2.4
    Library Module, Grid View
    Initial settings:
    LR Menu bar > Edit > Catalog Settings... > Metadata tab > Editing
    uncheck Offer suggestions from recently entered values
    uncheck Automatically write changes into XMP
    LR Menu bar > View > View options... > Grid View tab > Cell Icons
    check Unsaved Metadata
    Metadata panel: choose the Default Metadata Set.
    Import a JPG file into LR which contains no IPTC metadata.
    LR Menu bar > File > Import Photos from disk... > Choose the JPG file
    In the Import Photos dialog box, Information to Apply:
    Develop Settings: None
    Metadata: None
    Keywords: None
    Click Import.
    Click thumbnail of the JPG file which was Imported.
    In the Metadata panel click Caption field.
    Type "Word1" in the Caption field and press Return/Enter key.
    The Caption field loses focus.
    The Caption field should not lose focus when the Return/Enter key is pressed.
    Click the Caption field and press the Delete key to remove "Word1" from the field.
    In the Caption field type "Word1" and press Ctrl+Return/Enter key.
    As expected, the cursor moves to the line below "Word1" and the Caption field remains in focus.
    Type "Word2" and press Ctrl+Return/Enter key.
    As expected, the cursor moves to the line below "Word2" and the Caption field remains in focus.
    Click the JPG thumbnail and notice a down-arrow icon appears on the thumbnail indicating that the metadata for this JPG has been changed in the LR catalog and that it does not match the IPTC metadata that is embedded in the JPG file on the hard disk. Also notice in the Metadata panel, Metadata Status is "Has been changed".
    Click the down-arrow on the JPG thumbnail.
    See the dialog box that pops up saying "The metadata for this photo has been changed in Lightroom. Save the changes to disk?"
    Click Save.
    Notice on the JPG thumbnail, the down-arrow icon remains visible and does not disappear as it should if the JPG's metadata in the LR catalog and the metadata embedded in the JPG file on the hard disk were the same.
    Also notice in the Metadata panel, Metadata Status is "Has been changed".
    Click LR Menu bar > Edit > Catalog Settings... > Metadata tab > Editing
    check Automatically write changes into XMP
    Click OK.
    Notice on the JPG thumbnail, the down-arrow icon blinks rapidly. Also notice in the Metadata panel that "Metadata Status: Has been changed" blinks rapidly.
    Click LR Menu bar > Edit > Catalog Settings... > Metadata tab > Editing
    uncheck Automatically write changes into XMP
    Notice the blinking stops.
    Using a program that properly handles Carriage Returns/Line Feeds in IPTC metadata, such as Photo Mechanic 4.5, edit the metadata of another JPG file by typing "Word1", pressing the Return/Enter key, and typing "Word2" in the Caption field.
    Import that JPG into LR.
    LR Menu bar > File > Import Photos from disk... > Choose the JPG file
    In the Import Photos dialog box, Information to Apply:
    Develop Settings: None
    Metadata: None
    Keywords: None
    Click Import.
    Click the JPG thumbnail in LR Library Module.
    Notice in the Metadata panel, "Word1Word2" appears in the Caption field, in both the Default Metadata Set and the Large Caption Metadata Set. The CR/LF has been stripped away.
    CR/LFs typed into or pasted into the Large Caption set, also result in the persistence of the down-arrow icon even after metadata is saved to disk. And, if the Automatically write changes into XMP option is checked, the down-arrow icon blinks rapidly. And, if you view the Default set, notice Metadata Status: "Has been changed" blinks rapidly.
    When metadata is saved to disk, the down-arrow icon should disappear from the thumbnail, and in the Metadata panel, Metadata Status should read "Up to date". I would guess the blinking behavior indicates LR is stuck in some kind of loop - it is trying to save the metadata to disk and verify that it has been saved, but it keeps going round in a vicious circle. I also notice there is increased hard drive activity during the blinking behavior.

    Here is a related problem (using Lightroom 3.3, Windows).  When I import photos that have the IPTC caption field created in another program (ThumbsPlus, or IrfanView), carriage returns in the original do not show up in Lightroom.  Does anyone know why, or what to do about it?  I'd like to import lots of photos with existing captions, and some have carriage returns I would like to retain.
    For me, adding a carriage return to the Caption metadata within Lightroom works fine.  In the Library view, using the right panel, I can enter a carriage return using Ctrl+Enter in the Metadata > Default view or in the Metadata > IPTC view.  I can enter a carriage return directly with the Enter key (no Ctrl required) in the Metadata > Large Caption view.  After these entries are saved to the file, they show up correctly in other programs (IrfanView > Image > Properties > IPTC Info)

  • Write to spreadsheet adds carriage return

    I am using build array function to put together a number of strings and build an array of strings.  The build array is in a while loop.  A new line is added to the array every loop.  I am using write to spread sheet function to save the spreadsheet to a file with xls extension.  For some reason, a carriage return is inserted within the array.  The array has 9 columns and a carriage return is put after the fourth column.  I have not added this carriage return.  Does anyone know why write to spreadsheet might automatically add a carriage return and how to remove it?  
    Thank you!
    Solved!
    Go to Solution.

    Hi,
    I took your posted VI and compiled it to an exe.  I do not see the carriage return problem you are describing?
    If you compile the VI you attached, do you see the problem or is it only in the original main application (that you cannot share)?
    If the compiled exe works on your PC, does it also work on the 'different' computer where you see the issue with your original code?  
    -If it does work, then the issue must be in the source code for your original code.  Sometimes, if you re-size string constants, for example, it can be hard to see carriage return's.
    Another thing it could be perhaps, is if you are calling the "write spreadsheet" in two different places in your main code, then the way it works is it will write your two (different) input arrays to separate lines.  If it is as in your example VI though, there should be no carriage return in the "middle" of the array.
    For debug purposes, you could consider making a VI that takes a 1D string array input, iterates over each element in the array and searches for the carriage return character and gives an error/message on what iteration it found it, then you can back-track from there to see in the code responsible for making the string that went into that index.
    QFang
    CLD LabVIEW 7.1 to 2013

  • Simple Question: Carriage Return in description field

    Hi,
    i need to know how to insert a carriage return in my description field.
    Its a string field and I use the following code:
    rpt.DataDefinition.FormulaFields["BSpalte"j].Text ="\""bperiod((char)13)"Durchschnitt"bsperiod"\"" ;
    It compiles and the code is done faultless, but when the report needs to be shown,
    I get the message:
    Fault in report: .....
    Fault in formula BSpalte1...
    "Content of string
    " There is something missing..
    (i translated the message from german to english, maybe the translation is not quite correct )
    can you help me?
    Maria

    Hi,
    In SAP carriage return is represented by # symbol, when it reaches the form it turn out to be /n you dont need any script as such to see text in multiple lines.
    If you are using a textfield on the form for such data just make sure * Allow Multiple Lines * check box is selected.
    Then if the source is of n lines, the text field will represent n lines with a scroll bar respectively.
    Let me know if you need more help.
    Cheers,
    Sai

  • Ipad contacts not displaying all fields from mac address book, ipad contacts not displaying all fields from mac address book

    After syncing mac address book to ipad contacts, the ipad does not display all the fields that were in Mac address book (in my case all the email addresses).  Anyone have a fix?

    I have a problem similar to DeeRun's.. I would like the IM fields to be synced.. I use them to send e-mails to when the e-mail field is empty or when i just want to use that specific address.. Very annoying, would take hours if not days to transfer all those IM adresses to e-mail fields in addressbook..
    EDIT: not to mention the mess it would make in my address book!
    Message was edited by: 1NStanley

Maybe you are looking for

  • BAPI_NETWORK_MAINTAIN for UPDATE ACTIVITY-CN 307-You are not authorized to

    Hi all, sorry for disturb, I have a problem and I don't understand why.... I use BAPI_NETWORK_MAINTAIN with simple code. I have tried with SE37 with the same values and it correctly update the activity. without error messages. but with the same value

  • Vendor's master data validation

    Hi, I need to create a validation at vendor's master data. The validation that I need is regarding the IBAN is populated when vendor's bank data are informed. In other way, I want to ensure that IBAN is in the system when a vendor's bank data is info

  • Button's Text Doesn't Display The First Time

    Hi there. I'm new to flash, and have come across the following problem, and can't seem to resolve it. It's really urgent that it's fixed ASAP. Can someone help me please? If you go to www.apollosci.co.za, the flash intro, at the bottom. The tab's tex

  • NoClassDefFoundError when accessing outside class

    In my iView I need to reference to a class from a different package. I get NoClassDefFoundError exception trying it. I have a SharingReference for that package in my portalapp.xml: <application-config> <property name="SharingReference" value="myPacka

  • Yosemite FileVault resizes application reopened windows after login

    HI, I have a weird behaviour of reopened application windows (Reopen windows when logging back in feature) after I switched on the FileVault disk encryption. I think that it could be due to the fact that login screen is in 1280x800 resolution and my