You are here: Field Rules Reference > Field Rules Summary > SetAddr3

SetAddr3

Use this field level rule to handle a three-line address with six components, as shown here:

Address1 is required. Address1 is handled using the Move_It rule.

Address2 and Address3 are placed on line 2. The components of line 2 can vary. If both Address2 and Address3 exist, both are placed on line 2 with the delimiter passed in by the rule. If only one exists, no delimiter is used. If neither Address2 or Address3 exists, the line 3 (City, State and ZIP) is moved up to line 2.

Line 3 contains the City, State and ZIP code with a comma placed between the city and state, and a space added after the state and before the ZIP code. The ZIP code is formatted based on the format flag.

This rule is similar to the SetAddr2 rule. If Address2 or Address3 are not applicable, the remaining lines move up into their places. The City, State, and ZIP always remain on the same line.

Note An address line cannot exceed 256 characters.

The format mask must contain one of these options:

Option

Description

F

Initializes the function, fills the addr_ln array with the address components, builds the address lines, and returns the first line from the addr_ln array. The first time you call this rule the format mask field must contain an F.

N

Returns the next available non-blank address line from the addr_ln array. This mask is required for all subsequent SetAddr3 calls.

The various address data element mappings come from the first field rule record's Data element (after the record mapping).

The rule expects five fields to be mapped. If one is missing you will receive an error. This rule also assumes all address components are in the same record.

Here are the format parameters you can use:

Parameter

Description

C

Converts to sentence style where the first character is capitalized and the remaining characters are lowercased.

D

Converts the data returned by the rule into lowercase.

U

Converts the data returned by the rule into uppercase.

See also