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.

remove unwanted space calc

Featured Replies

I have some records that have unwanted space in the field before the information. Is there a text calc to remove it on the left of the information?

Thanks

Hello Hartmut,

You can try to use Trim (FieldText).

See the FM Help about Trim.

Hope this answer your question...

  • Author

I tried but the field remains the same.

if it says " Main Street " it has spaces before and after.

The info in the field is always different length, I just don;'t know how to trim off the blank spaces before and after.

Thanks

Dave

Hi

1) Show all Records

2) Put the cursor into that field

3) Make a Replace by calculation and calc:

Trim ( yourField )

Now all your existing records are correct.

But to prevent other errors, put this calc into the auto-enter option of that field ( Remember to uncheck the box "Do not replace existing value of field.." )B)

Trim ( yourField )

  • Author

Thank you

Now that I am looking at it there are several times that i would need to extract different amount of words from one field "alltext" to the new field called "member" between 2 symbols like the "•" symbol and the "," but the number of words in between those two symbols might be a different amount sometimes 3 words sometimes 5 words.

ex.

• the sky is falling , / return "the sky is falling"

• every good boy does fine, / return "every good boy does fine"

Calc for the new field:

Let([

start = Position ( alltext ; "•" ; 1 ; 1 ) + 1 ;

end = Position ( alltext; "," ; 1 ; 1 ) - start

];

Trim ( Middle ( alltext ; start ; end ) )

)

  • Author

thank you

it works great

i have another place where the varied amount of words exists between two "," (commas) and when i use this text calculation i get a blank field

what is the difference? between this "•" and this","

what do i do if i want the words between two commas?

Let([

start = Position ( alltext ; "," ; 1 ; 1 ) + 1 ;

end = Position ( alltext; "," ; 1 ; 2 ) - start

];

Trim ( Middle ( alltext ; start ; end ) )

)

  • Author

Thank you danielle

I am going to try this with all my projects. You saved my day

Thank you again

Dave

  • 1 year later...

I have a related problem, that does not seem to be solved by this example. A user can input "Tags" in a field like this:

Tag1, Tag two with more info, Tag3

The different tags are seperated by a comma.

Now, I want these tags put in a value list, and I used the function "Substitute" to replace the comma with a line break, and then base a value list on this field. This works fine, but then a number of entries begin with a whitespace like this:

Tag1

Tag 2 with more details

Tag3

If I try to substitute the whitespace with a "", then the result is:

Tag1

Tag2withmoredetails

Tag3

How do I make sure that only whitespaces coming after a comma gets removed?

You might try:

Trim ( Substitute ( text ; [ ", " ; "," ] ; [ "," ; ¶ ] ) )

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.