On this page: Description, Step by Step Instructions (Set Field from File, Set Field to Literal, Clear Field, LowerCase Field, UpperCase Field), Why Does This Feature Exist?, Data File Format
Description
The Set Person Field panel supports multiple functions. All of them change the value of a field in the "person" table. All of the functions are not available for all the fields in the Field to change pull-down menu.
Set Field from File changes the value for a subset of people. The function requires an external data file in a particular format that is described below.
The following fields may be set: Reference, Last Edit Date, Gender, Living Flag, BirthOrder, MultiBirth, or any custom flag.
Set Field to Literal sets the the value of a field to a user-specified value.
Clear Field sets the the value of a field to the default value.
Note that Set Field to Literal and Clear Field set the value for all people in the database, whereas Set Field from File changes it for a particular subset based on the input file.
LowerCase Field changes the alphabetic characters in a field to lowercase characters.
UpperCase Field changes the alphabetic characters in a field to uppercase characters.
Step by Step - Set Field from File
- Create a data file in the format described below.
- Choose Set Person Field from the function tree.
- Select the field you want to change from the Field to change pull-down menu.
- Check or Uncheck Input values are quoted as desired.
If the values in the text file are quoted, and the quotes are not part of the data, make sure this box is checked.
- Click the [Set Field from File...] button.
- Choose the input file using the standard file dialog and click the [OK] button.
Step by Step - Set Field to Literal:
- Choose Set Person Field from the function tree.
- Select the field you want to change from the Field to change pull-down menu.
- Click the [Set Field to Literal...] button.
- An input dialog appears. Key the value (the literal) that should be assigned to the field.
- Click the [OK] button to close the input dialog and start the assignment process.
Step by Step - Clear Field:
- Choose Set Person Field from the function tree.
- Select the field you want to change from the Field to change pull-down menu.
- Click the [Clear Field...] button.
- Click the [OK] button in the confirmation dialog.
Step by Step - LowerCase Field:
- Choose Set Person Field from the function tree.
- Select the field you want to change from the Field to change pull-down menu.
- Click the [LowerCase Field...] button.
- Click the [OK] button in the confirmation dialog.
Step by Step - UpperCase Field:
- Choose Set Person Field from the function tree.
- Select the field you want to change from the Field to change pull-down menu.
- Click the [UpperCase Field...] button.
- Click the [OK] button in the confirmation dialog.
Why Does This Feature Exist?
The Set Field from File feature was created primarily to allow making bulk edits to the Reference field. I added the capability to modify other fields because the technique seemed valid in certain cases, such as the Last Edited Date.
In the case of flag fields, TMG will modify them using the Report Writer, but this feature has two limitations:
- The modification must be made based on a List of Persons report.
- You must be able to specify criteria to identify the people whose flag you want to set.
In practice, those limitations are not a big problem. In certain cases, however, they make it impossible to use TMG to do bulk changes, and that leaves only one option: tedious, one-at-a-time editing.
Joe Murphy's utility program had a similar function which was in development at the time of his death. Jim Byram brought that to my attention and that was a major incentive for me to include it here--to honor his memory by completing a feature that he was unable to complete before he went on to bigger and better things.
The other two functions, Set Field to Literal and Clear Field, were added because of user requests and because they are useful complements to the main function.
LowerCase Field and UpperCase Field were added because a user needed them and they were easy additions based on the existing functions.
Data File Format
The "Set Field from File" feature requires a "tab-delimited" text file. This text file determines both who and what, where "who" is which people's values are set, and "what" is what value to assign for a particular person.
The text file can be created by hand in a text editor, or it can be created by some other program, such as TMG's own Report Writer or Microsoft Excel. A combination of methods may be required.
The tab-delimited text file has one line for each person to be updated. Each line must contain 2 data values, separated by a tab character.
id-numbervalue
In the examples above and below, takes the place of a real tab character. Tabs are not visible in web browsers, so I have replaced them with in this documentation.
The id-number must be the TMG ID number of a person that exists in the database being processed.
The value is the data to be assigned to the field chosen from the pull-down menu (see Step by Step - Setting Field Values, above).
If the text file contains more than two data values, the third and successive values are ignored. This may be useful; if you produce a data file using another program but you need to do some manual editing to create the proper field value, the third and subsequent fields can hold data that reminds you what value should be assigned.
id-numbervalueignored
Here are some correctly-formed entries:
Each text line begins at the left margin. If you view this page in a narrow browser window, the line may wrap. Any indented text is a continuation of the line above. Do not wrap lines when you create an actual data file. The other examples on this page follow the same convention.
Some things to note are as follows.
- The example assumes that 117, 98, 1001, 435, and 42 are valid TMG ID numbers.
- The example also assumes that the field being modified is at least 7 characters wide, as that is the length of the longest data value entries.
- The ID numbers do not have to be padded to a consistent length.
- The ID numbers to do not have to appear in sequence.
- The value field can contain different length data as long as it does not exceed the length of the database field being modified.
- Extra data fields may appear in zero, some, or all input records.
Some programs like to put quotes around data fields. This often happens in "comma-delimited" data files, but it can also be true for tab-delimited files. If you create such a file, it might look like the following:
The lines above are also correctly formed, provided that Input values are quoted is checked when the data file is processed.