List and file mapping
-
The
TextListMappingfunction allows you to take the elements of a text list and apply your selected mapping. -
The
TextListFromFilefunction 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:
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:
This expression returns " Hello, World"
PostDist5¶
This mapping creates a string with the postcode turned into a 5 character postal district.
Example:
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:
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:
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:
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:
This expression returns "HELLO,WORLD"
Lower¶
This mapping creates a string with all upper case characters turned into lower case ones.
Example:
This expression returns "hello,world"
PostArea¶
This mapping creates a string with the postcode turned into a postal area.
Example:
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:
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:
This expression returns "HELLO,WORLD"
Proper¶
This mapping creates a string with all words proper cased.
Example:
This expression returns "Hello,World"
TPSNoSpaces¶
This mapping creates a string where all telephone numbers are TPS formatted and spaces removed.
Example:
This expression returns "01224631892,01234567890"