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 Within Script Required Please

Featured Replies

If I have a field that contains values such as:

01 08 14 22 Q

Can I write a script step such as 'Insert Calculated result' that will remove the 'Q' from this field and leave the other numbers in the field? There can different numbers in different quantities separated by a space. If it helps the 'Q' will always be the last value in the field. I was thinking one of the following functions such as PatternCount, Replace or Substitute may help.

Hi adyf,

You are correct in that the Substitute function can be used. if you are confident that the values in the fields always follow the same formatting, and, and that Q will be the last value in the list, you can use the following substitute formula:

Substitute ( YourField ; " Q" ; "" )

This will replace all occurrences of a space followed by a Q, and remove it essentially. Note that the substitute function is case sensitive, so if you cannot guarantee the case of the Q, try:

Substitute ( YourField ; [ " q" ; "" ] ; [ " Q" ; "" ] )

The substitute function as mentioned is for your ideal case, it may fail if the Q is in any other place in the field.

You can then use the Replace Field contents script step to perform this replace on every record in your found set. Use it with the calculation option & use the substitute function in there.

Having multiple "facts" per field is often a sign of poor design. Shouldn't each of these values be a separate record?

However, if you wish to strip the Q, and it's always the last value, then newField= left ( origField; length (origField)-1)

Use this approach if you wish to maintain the origField rather than Replace.

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.