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.

Trim last character from line

Featured Replies

if[Right(fieldname);1)="^"]

set variable[$header; fieldname]

What I need to do is trim the ^ when I set the variable--

Thus the set variable should look like this--

set variable[$header; ;)??]

If I remember I would use right and trim in order for it to remove the ^. Just can't remember the correct format.

Thansk for you help chuck

Set Variable [ $header ; TrimAll ( Substitute ( text ; "^" ; " " ) ; 1 ; 1 ) ]

I do not believe the If[] test is even necessary but this *is* untested. It should remove the ^ no matter where in the field. :wink2:

Edited by Guest

Any particular reason you're going with TrimAll vs. good old Trim?

Only one ... it inserts a space between non-Roman and Roman text if there isn't one and it takes no more evaluations so it seems more all inclusive. :wink2:

I tease of course. The most important reason is to remove TWO spaces between. With a strange character such as the caret, I cannot guarantee there aren't extra spaces so I take the extra precaution to remove them.

  • Author

LaRetta: Set Variable [ $header ; TrimAll ( Substitute ( text ; "^" ; " " ) ; 1 ; 1 ) ]

Some of my records I use ^ in more places then at the end. Thus, this solution will not work for me. I know for a fact the ^ will be at the end of the sentence.

eg. the quick brown ^fox jumped over the lazy cat[color:red]^.

[color:red]I just need to remove the ^ after cat. This will always be the case.

For some reason, I think I need to do a right(??) function.

Edited by Guest

Try:

Left ( text ; Length ( text ) - ( Right ( text ; 1 ) = "^" ) )

This will remove the last "^" (if there is one), and ONLY the last one. If the text ends with "cat^^", only the last "^" will be removed.

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.