Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 359

Content builder - Formatting numbers of different lengths to show in different ways

$
0
0

Using content builder to create emails, and pulling numbers in from a data extension.

Some are 9 digits and some are 10 digits.

Using 'format number' to show spaces between some of the digits so they show as either "### ### ###" or "### #### ###".

So I would always like to lead with a group of three digits.

I've used the following %%=formatnumber(@telNo,"### ### ###")=%% but in instances where there are 10 digits the extra digit always shows in that first group, so it returns "#### ### ###".

If I try %%=formatnumber(@telNo,"### #### ###")=%%, to add that extra digit to the middle group, when it's only 9 digits it returns "## #### ###".

Any potential solutions would be appreciated.


Viewing all articles
Browse latest Browse all 359

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>