SOLVED
Adding area code to phone number
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Dev11
5 - Atom
‎03-11-2024
04:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi guys Newbie here I was wondering if anyone could give me a solution as to how I can add the UK area code on a field with the format 7xxxxxxxxx so it looks like +44 7xxxxxxxxx.
IF StartsWith([Phone], "7") THEN ReplaceFirst([Phone], "07", "+44")
ELSE [Phone]
ENDIF
I was using this but it does not seem to work
Solved! Go to Solution.
Labels:
- Labels:
- Workflow
3 REPLIES 3
ShankerV
17 - Castor
‎03-11-2024
04:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Dev11
Please try the below.
IF Left(tostring([Field1]), 1) = "7"
THEN "+44 " + ToString([Field1])
ELSE [Field1]
ENDIF
Many thanks
Shanker V
ShankerV
17 - Castor
‎03-11-2024
04:58 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Dev11
In the IF condition, we are checking whether the first digit is 7
If yes, then adding +44 as per your requirement
Else then displaying the same phone number
Hope it helps!!!
Many thanks
Shanker V
‎03-11-2024
04:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Shankar worked like a charm
