Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Calculation for text spacing to also accomodate when null

Featured Replies

I had a field to concatonate a person's FullName:  NameFirst&" "&MiddleInitial&" "&LastName&" "&Suffix

 

But I noticed, if the middle initial field was blank I'd still get the additional space between the NameFirst and MiddleName.  So I tried modifying the FullName field as follows in an effort to get rid of the additional space in those cases where the MiddleInitial was null (but this didn't work either):

 

 

Trim(NameFirst)&" "&Trim(MiddleInitial)&" "&Trim(NameLast)&" "&(Suffix)

 

Example above produces: Bill H Muldoon Sr

 

However, if the MiddleInitial field is null the above calculation produces an extra space between the NameFirst and the MiddleInitial.

 

Bill  Muldoon Sr… when what I want to produce is

Bill Muldoon Sr

 

How can I modify this calculation so if the MiddleInitial field is null there is no space between NameFirst and MiddleInitial?

 

Any suggestions would be greatly appreciated. 

Try either:

Substitute ( List ( NameFirst ; NameMiddle ; NameLast ; Suffix ) ; CR ; " " )

... where CR is pilcrow ( I can't make it on iPad.)

Or

Trim ( NameFirst & " " & NameMiddle & " " & NameLast & " " & Suffix )

Edited by LaRetta

  • Author

Many thanks, LaRetta... mp

Have a look at the TrimAll() function.

Oh geez, I original posted TrimAll() and then changed it.  That is what I get for answering within 30 seconds of waking up ... no brain yet.  Thanks for the catch Michael. :^)

 

So it would be, as in the first email you received, Marsha:

 

TrimAll ( NameFirst & " " & NameMiddle & " " & NameLast & " " & Suffix ; 0 ; 0 )

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.