On this page: Description, Step by Step, Filters, Actions, User Variables, Field Labels, Rule Files, Example Rule Files

Description

Change Place Parts will change place parts (detail, city, county, state, etc.) under the control of one or more filters and one or more actions.

Filters determine which places are changed. If more than one filter is supplied, the filters are anded together, meaning that the name must pass all the filters in order to be changed. The available filters support testing place part contents as well as the place style.

Actions determine how the places are changed. The available actions support adding or deleting prefixes, adding or deleting suffixes, setting the entire contents of a place part, or changing the place style.

Both filters and actions use the standard place part labels.

Step by Step

  1. Choose Change Place Parts under Places in the function tree.
  2. Specify the filters and actions by clicking [Set Rules...] to open the Rules Editor.
  3. Set the Match case checkbox if you want the filter terms to be case sensitive. When Match case is checked, "MIXED" does not equal "Mixed". When Match case is not checked, they are equal. The default is unchecked.
  4. Set the Show All Place Fields checkbox if you want the log to show all the name fields in sequence rather than using the associated Place Style to format the log entry. This is useful if you are changing one or more subfields that do not display such as the SortGiven or SortSurname fields.
  5. Click the [Change Place Parts] button.
  6. TMG Utility will prompt for the literal values if the rule set includes user variables.

Filters

Data Operators Values Comments
Any Place Part
Addressee
Detail
City
County
State
Country
Postal
Phone
Postal
Temple
equal to
not equal to
starts with
contains
ends with
A sequence of one or more characters.

You can use variables and field labels in this value.

These filters can be used to test the contents of a specific part or all parts.
Any Place Part
Addressee
Detail
City
County
State
Country
Postal
Phone
Postal
Temple
like A "regular expression".

Regular expressions are a powerful matching facility that allow you to search for patterns of text rather than for literal text values. If you are not familiar with regular expressions, you may want to consider them as a means to add wildcard characters to the target. Regular expressions are described for the Find and Replace feature.

This filter can be used to test the contents of a specific part or all parts.
Any Place Part
Addressee
Detail
City
County
State
Country
Postal
Phone
Postal
Temple
is empty
is not empty
<not available> These filters can be used to test whether a field is empty or not empty.
Place Style equal to
not equal
A place style from the list. This filter can be used to test the style assigned to the place.

The sequence of filters is important only in that the processing will be faster if the most restrictive filters are at the top of the list. No wildcards are allowed.

Actions

Data Operators Values Comments
Addressee
Detail
City
County
State
Country
Postal
Phone
Postal
Temple
prepend
delete prefix
set to
append
delete suffix
A sequence of zero or more characters for set to, or a sequence of one or more characters for the other operators.

You can use user variables and field labels in this value.

These actions can be used to modify the contents of a specific part. In order to move data from one part to another, you should use an action that deletes data as well as an action that creates data.
Addressee
Detail
City
County
State
Country
Postal
Phone
Postal
Temple
replace A target value in the first textbox and a replacement value in the second textbox. This action can be used to modify the contents of a specific place part.

The target value will be replaced by the replacement value.

Addressee
Detail
City
County
State
Country
Postal
Phone
Postal
Temple
replace pattern A target value in the first textbox and a replacement value in the second textbox. This action can be used to modify the contents of a specific place part.

The target value will be replaced by the replacement value. The target value is a regular expression.

Regular expressions are a powerful matching facility that allow you to search for patterns of text rather than for literal text values. If you are not familiar with regular expressions, you may want to consider them as a means to add wildcard characters to the target. Regular expressions are described for the Find and Replace feature.

The syntax for User Variables conflicts with some regular expressions. You can will have difficulty if you try to use a character class expression that begins with "v", as in "[v ...]". Put the "v" elsewhere in the character class to avoid the conflict.

Addressee
Detail
City
County
State
Country
Postal
Phone
Postal
Temple
copy A part from the list. The copy operator can be used to copy the contents of one part to another part.
Place Style equal to
A style from the list. This operator can be used to set the name style assigned to the name.

You can combine actions to change multiple parts, etc. The sequence of actions is important only if you perform two or more actions on the same part.

User Variables

You can include variables in any literal text field used by filters or actions. Variables allow the creation of general purpose rules; the value of a variable is set by prompting the user when the rules are executed.

Variables are entered as follows: "[Vn:prompt]" where

If you use the same value more than once in a rule set, and there's a possibility that in the future you'll want to use the same rules with different value, it's a good idea to use a variable to define the value. Then save the rule set to a file for later use.

TMG Utility will only prompt once for a variable, so you only have to key the "prompt" part of the variable reference once. For example, if you use [V1:Country?] and in a subsequent filter or action you use [V1], both variable references will be replaced by the same value: whatever is keyed in response to the "Country?" prompt.

If you click "Cancel" when prompted for a value, TMG Utility will not perform the processing defined by the action rules.

If you want a space (or other special character) before or after the variable text, but whether the space is necessary varies according to the filter or action where it is used, key the space as a literal and do not key the space when prompted for the variable value.

You can not nest user variables. You can put multiple variable references in a literal field, in any sequence.

See the Change Name Parts feature for information and examples of User Variables.

Field Labels

You can reference the value of another field via a Field Label in any literal text value used by filters or actions. Field Label references support the creation of general purpose rules.

The Change Place Parts feature supports the following Field Labels only. If you use custom styles or country-specific versions of TMG that do not use the following labels by default, choose a Field Label from the list below based on the sequence # that matches your Field Label.

Number Field Label
1[ADDRESSEE]
2[DETAIL]
3[CITY]
4[COUNTY]
5[STATE]
6[COUNTRY]
7[POSTAL]
8[PHONE]
9[LATLONG]
10[TEMPLE]

Rule Files (.u5r)

You can save and load rule files using the Rules Editor. The "u5r" files look like text files, but they include invisible characters embedded in the text. Don't change them with a text editor such as Notepad or TextPad. Change them using the Rules Editor.

Example Rule Files

There are a few example rule files in the Rules folder supplied with TMG Utility that demonstrate the feature and actually produce results you might want.

Name Comments
Change Co to County.u5r Changes " Co." to " County" when it occurs at the end of the County field.