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.

Trim4 problem? (or my use of it?)

Featured Replies

I'm trying to use the Trim4 function to remove leading blanks, tabs and CRs from a block of pasted text (into Table::Text). I have a calculated field that is simply Trim4(Table::Text).

The function works, except when there is an odd number of spaces immediately in front of the first character -- then the first character is dropped from the result.

First, can someone confirm this behavior? Is there a valid reason for it working that way? I tried playing with the 1+C1 part of the definition by changing it to only C1 as the starting point. That fixed the leading space problem, but broke its ability to filter out CRs and tabs. Beyond that simple attempt, I'm unsure of what to try.

I'll also mention that I tried to heed the caution about cutting/pasting the function code. It appears to be pasted in properly -- two blank characters followed by a tab and pilcrow. But how do I confirm what those blank characters really are? Should literals be used instead?

Any help will be greatly appreciated.

  • Author

Further investigation has revealed that it IS a result of the pasting of the characters in the function definition. What you paste is not what you get (as the Note cautioned).

I've replaced the " " parts of the definition with Char(9) & Char(13) & Char(32) and Char(160) and everything appears to work.

Pending further developments, I'll consider this resolved.

Could you post a copy of the actual text that is in the field, including the before and after spaces, returns, etc.

Lee

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.