Skip to content

List and file mapping

  • The TextListMapping function allows you to take the elements of a text list and apply your selected mapping.

  • The TextListFromFile function also allows you to include optional mapping when reading a text list from a column in a file.

Available options

The avilable mapping options are:

RJZP

Right Justified Zero Padded

Must be used with the mapping size parameter.

This mapping creates a string of the mapping size with '0' characters at the start.

Example:

Expression
StrList(TextListMapping(CreateTextList("Hello", "World"), "RJZP",8))

This expression returns "000Hello,000World"

RJBP

Right Justified Blank Padded

Must be used with the mapping size parameter.

This mapping creates a string of the mapping size with ' ' characters at the start.

Example:

Expression
StrList(TextListMapping(CreateTextList("Hello", "World"), "RJBP",8))

This expression returns " Hello, World"

PostDist5

This mapping creates a string with the postcode turned into a 5 character postal district.

Example:

Expression
StrList(TextListMapping(CreateTextList("CV34 4HD", "M20 2DF", "SW1A 4WW", "B1 1DF"), "PostDist5"))

This expression returns "CV34,M 20,SW 1A,B 1"

PostDist4

This mapping creates a string with the postcode turned into a 4 character postal district.

Example:

Expression
StrList(TextListMapping(CreateTextList("CV34 4HD", "M20 2DF", "SW1A 4WW", "B1 1DF"), "PostDist4"))

This expression returns "CV34,M 20,SW1A,B 1"

PostDistToPostDist5

This mapping creates a string with the postal district turned into a 5 character postal district.

Example:

Expression
StrList(TextListMapping(CreateTextList ("CV34", "M20", "SW1A", "B1"), "PostDistToPostDist5"))

This expression returns "CV34,M 20,SW 1A,B 1"

PostDistToPostDist4

This mapping creates a string with the postal district turned into a 4 character postal district.

Example:

Expression
StrList(TextListMapping(CreateTextList ("CV34", "M20", "SW 1A", "B1"), "PostDistToPostDist4"))

This expression returns "CV34,M 20,SW1A,B 1"

Upper

This mapping creates a string with all lower case characters turned into upper case ones.

Example:

Expression
StrList(TextListMapping(CreateTextList ("Hello", "World"), "Upper"))

This expression returns "HELLO,WORLD"

Lower

This mapping creates a string with all upper case characters turned into lower case ones.

Example:

Expression
StrList(TextListMapping(CreateTextList ("Hello", "World"), "Lower"))

This expression returns "hello,world"

PostArea

This mapping creates a string with the postcode turned into a postal area.

Example:

Expression
StrList(TextListMapping(CreateTextList ("CV34 4HD", "M20 2DF", "SW1A 4WW", "B1 1DF"), PostArea))

This expression returns "CV,M,SW,B"

PostSect

This mapping creates a string with the postcode turned into a postal sector.

Example:

Expression
StrList(TextListMapping(CreateTextList ("CV34 4HD", "M20 2DF", "SW1A 4WW", "B1 1DF"), PostSect))

This expression returns "CV34 4,M 20 2,SW 1A4,B 1 1"

UpperNoSpaces

This mapping creates a string with all lower case characters turned into upper case ones and then remove spaces.

Example:

Expression
StrList(TextListMapping(CreateTextList ("Hel lo", "wor ld"), "UpperNoSpaces"))

This expression returns "HELLO,WORLD"

Proper

This mapping creates a string with all words proper cased.

Example:

Expression
StrList(TextListMapping(CreateTextList ("HELLO", "world"), "Proper"))

This expression returns "Hello,World"

TPSNoSpaces

This mapping creates a string where all telephone numbers are TPS formatted and spaces removed.

Example:

Expression
StrList(TextListMapping(CreateTextList ("01224-631892", "+441234567890"), "TPSNoSpaces"))

This expression returns "01224631892,01234567890"