Results 1 to 6 of 6
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    concatenation in fields (2002)

    I want to do a concatentation with merge fields. e.g., if I insert an "if" field to see if the last name is not blank, then print the last name, followed by comma followed by the first name...i.e., Jones, William But, if there is no last name, just print the first name.

    My simple brain thought something like: IF("" <> lname {ref lname &","} ) ????? UGH...

    Does anyone understand what I'm trying to write and can it be done?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: concatenation in fields (2002)

    Try something like this - remember, don't type the field brackets { } yourself, but insert them by pressing Ctrl+F9 or by selecting Insert | Field.

    <code>{ IF { MERGEFIELD LName } = "" "" "{ MERGEFIELD LName }, " }{ MERGEFIELD FName }</code>

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Re: concatenation in fields (2002)

    I get the idea but I am getting the text "Lname" printed rather than the bookmark contents. So, clearly I'm doing something wrong here.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: concatenation in fields (2002)

    If you are doing a mail merge, as you stated in the first post, you can switch between seeing the merge field names and their contents using a button on the toolbar (see below), or by merging to a new document. If you're not doing a mail merge, omit both occurrences of the word MERGEFIELD.
    Attached Images Attached Images
    • File Type: bmp x.bmp (506 Bytes, 1 views)

  5. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,470
    Thanks
    30
    Thanked 62 Times in 58 Posts

    Re: concatenation in fields (2002)

    Eventually, the merge will use a mergefield because the data will come from elsewhere (this is a law firm pulling from Client Profiles fields). In testing this, I used an ASK field and am then trying to get the appearance as described before.
    So, I wrote: {if "" <> {lname} "{lname}, " }{fname} but, if the lname is totally blank, I get a bookmark error.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: concatenation in fields (2002)

    That is specific to the ASK field. If you leave the prompt blank, the bookmark associated with the ASK field is deleted. This problem does not occur with MERGEFIELD fields.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •