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.

removing all data but numbers in a text field

Featured Replies

Hi all

I have this text field into which I store phone numbers. Entries usually look like this : 751-862-7845. I'm looking for a way to only keep numbers, so the field would now look like this 7518627845...is there a way to do this?

thanks in advance

:-)

Luc

Version: v6.x

Platform: Windows XP

Hi Luc,

I can think of a couple of ways to do this depending on what you want the permanent data to be. You could strip the field using a loop script and the Replace Script Step with the Calculation of Substitute(YourPhoneField, "-", "") - This removes the "-" permanently.

Or

You could create a second field and make it a calculation using the Substitute calculation above - this preserves the original field.

HTH

Lee

Hi Luc,

May be :

SetField[PhoneNumber,Substitute(Substitute(Substitute(Substitute(PhoneNumber,"(";"";")";"";"-",""," ","")]

  • Author

thanks guys

waow...I did not know 7 was out...I'll download the trial version(french will most probably come out later though...what a drag! wink).

I'll try your suggestions and let you know the result. Being a text field, I have other words sometimes included in there besides "-"...will that cause a problem in the substitute function that you suggested?

have a great day and thanks again for your input.

Luc

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.