Skip to content
 

Picture Function

The Picture function lets you provide a template to use when formatting a string. For example, you can force a phone number to appear in the format (906) 555-1212, or a Social Security number to appear in the format 326-75-3847. Use it in conjunction with the ToText function, and you can also control how a number is displayed.

Syntax Example Result
Picture(x, “y”) Picture({ssn},”xxx-xx-xxxx” “326-75-3847″
where ssn=”326753847″

Numbers (and Currency)

Syntax Variable Optional
Picture(x, “y”) x The string to format
“y” The template to use when formatting (must be enclosed in quotes)

Examples

Example Result
Picture(CA,”[xx]“) “[CA]“
Picture({phone},”(xxx) xxx-xxxx” “(906) 555-1212″
Picture({city},”xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”) “Calumet” result is cropped to max number of x’s you have included; so make sure to use enough to cover longest result. The max is 252 characters.

Note: You cannot use an asterisk as a wildcard in the picture argument. If you put an asterisk in the argument, it will show up as an asterisk in the resulting string.

Leave a Reply