I too invented this simple gem

Version 1

    In my world, I invented this FM custom function that I use more than almost any other function.

    It's for formatting text.  I call it the "Merge" function; and I suspect some of my co-inventors chose the same name.

    So, for those still interested, this function very simply bookends your text with a text "prefix" and "suffix", as long as the text you supply is not empty.  Otherwise, the function returns nothing.

    So, if you don't have this one in your custom function list, please try it out.

     

    Example of use:

    FullName = Merge ( NameFirst; ""; " " ) & NameLast

    ... prevents the extra space when the first name field is empty

     

    CustomerName & "¶" &

    AddressLine1 & "¶" &

    Merge ( AddressLine2; ""; "¶" ) &

    City

    ... prevents the extra carriage return when there is no second address line

     

    ParentheticalNickname = NameFirst & " " & Merge ( NameNick; "("; ") " ) & NameLast

    ... e.g. John (Jack) Doe

     

    Capture.PNG