Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    conditional concatenation character (a2003)

    I have a concatenated field that unites three fields separated by a comma and a space. The field displays with a comma and a space separating the strings. It's disconcerting to the user to see an entry like NPSS, , happens when I have an organization with no department or office. Is there a way to make the appearance of the comma conditional on having a value follow it?

    E

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

    Re: conditional concatenation character (a2003)

    Use this:
    <pre>ConcatenatedField: [Field1] & (", "+[Field2]) & (", "+[Field3])
    </pre>

    The "trick" is that concatening with + instead of & results in Null (blank) if one of the parts is Null.

  3. #3
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: conditional concatenation character (a2003)

    A neat trick Hans! I have always used the messy IsNull() function, which makes for a much more complex expression.
    Wendell

Posting Permissions

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