Jump to content

Remove First Two Characters of a Number

Recommended Posts

I originally asked for help with this problem back in 2016 and I received a reply that worked at the time. But now for some reason it does not work anymore and I could use some help. I have a telephone number formatted as follows:

+17035551212 and it is in a field named [mobilenumber]

I want to remove the first two characters so the number looks like:


and then insert this number in a field called [mobilenumberten].

For some reason I just cannot get it to work anymore on my submission form datapage. Any suggestions would be helpful. Thanks in advance.

Share this post

Link to post
Share on other sites

Hi cldb2016,

Perhaps you can utilize formula field with substring function instead of custom JavaScript Solution.

Here are some links to articles about formula field and its function:





Share this post

Link to post
Share on other sites

You can try to add this formula field to your table:


CASE WHEN Charindex( '+1',[@field:Phone]) > 0 THEN Substring([@field:Phone],3, 10) ELSE [@field:Phone] END

Phone is the name of the field you have for phone number in your table. It is always recommended to select the fields from picker

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...