Separate numbers

Hi, I am trying to create a number separator that goes into the database and exposes the data differently.

Here is an exempel:

Data Phone number: 0701234567
Displayed in the frontend: 070 123 45 67

To be more specific, we added spaces on the 3rd 6 and 8 character. Is that possible?

Is that a US phone number?
If so, just store the data as a text field without any extra formatting, so like 0701234567

Then when you want to display the phone number you can use :formatted asUS Phone

Check out this image from another thread

Screenshot 2020-06-13 15.19.14

Hi Kayami, unfortunatly its not an US phone number. Its a Swedish one, is there any other way to fix the issue?

Hello @rafael.cunha!

You can do it with “:truncated to” operator. It’s a bit of a hassle to do, but it works the way you want it to.

You can take a look at the sample I prepared.

Best!

This topic was automatically closed after 70 days. New replies are no longer allowed.