Jump 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.

Ampersand and Commas causing problems with LeftWords, etc

Featured Replies

I have a Calculation field containing text such as "Cats & Dogs" and "One, Two, Three"

I need to replace all occurrences of 'space' in every occurrence in this field with a string (' ' as it happens) but when I use functions such as LeftWords or PatternCount in doing this, the '&' is ignored, and the 'commas' in One, Two, Three get stripped out.

I presume that FMPro is treating anything non-alphanumeric as 'whitespace'.

What is the most elegant solution to this problem?

Using FMPro 8.5, and not planning to upgrade in the very near future...

I need to replace all occurrences of 'space' in every occurrence in this field with a string

Why not use the Substitute() function?

I presume that FMPro is treating anything non-alphanumeric as 'whitespace'.

That is an incorrect assumption. Some characters are word delimiters, some are not. And some characters are word delimiters only under certain circumstances.

  • Author

Thanks! I took a wrong turn by choosing to use PatternCount( ) rather than Susbtitute( ).

It hadn't seemed obvious to me that Susbtitute( ) worked on ALL occurrences, and it happily handles & and ,

Thanks for your help. My problem now seems to be solved. :)

Create an account or sign in to comment

Important Information

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

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.