0

Search and Replace Usage Examples

This page gives examples of using the plugin in various ways.

Date Error Correction

In the Search box enter the invalid Date value, such as 31 June.

In the Replace box enter the replacement value, such as 30 June or 31 July.

With Date fields all words are spelled out in full such as January, December, estimated, calculated, circa, before, after, and between.

Ensure the Plain Text Mode and Case Insensitive and Whole Words modes are selected.

To search only Date fields, clear all Basic Filters except Date fields, or on Extra Filters tab use Exclude All Short Text and Exclude All Long Text to leave just Date fields ticked.

Click the Search & Replace button, then in each Confirmation prompt, either approve the change by clicking the Replace button, or inhibit the change by clicking the Skip button. You can adjust the change by typing into the Replacement Value box.

Return to top.

Missing Occupation Values

To find any missing field values, clear the Search box.

If they all need replacing with the same value, then enter that in the Replace box, otherwise leave it empty.

Select the Extra Filters tab tab, use Exclude All Short Text and Exclude All Long Text, and clear all the Distinctive Fields.

Tick Fact Attribute values and select Occupation (INDI.OCCU) from its drop-down list.

Click the Search & Replace button, then in each Confirmation prompt:

  • Ensure the desired Occupation is entered in the Replacement Value box and click the Replace button.
  • To terminate the search before all fields have been processed, click the Cancel button.

When complete, the changed Occupations will be listed in the Result Set.

If any are incorrect, then double-click on its New Value box and update via the Property Box.

To reverse all the changes use Edit > Undo Plugin Updates.

Return to top.

Place Name Changes

The Family Historian Place records pose an extra challenge when changing Place names.

Global Change Example

The objective is to make global changes to existing Place names, but without altering the links between Place fields and Place records, and retaining all Place record details such as Lat/Longitude, Notes, Media, etc.

The default plugin settings will often handle the above scenario. The Place records are searched first, so any Place name changes there will automatically update associated Place fields and thus be unaffected by the plugin.

However, if the replacement text might match the search filter, or just to be safer, set the Search Scope: to Place Records (_PLAC) and clear all the Extra Filters except Record Names/Titles. That ensures both the Place Name and Standardized fields are changed but leaves all other fields unaltered. If only the Place Name (_PLAC.TEXT) or only the Standardized (_PLAC.STAN) field needs replacing then select those options from the Record Names/Titles droplist.

Selective Change Example

The objective is to make selective changes to some Place names, and for new Place field values to create new blank Place records, but leave all other Place fields and records unaltered.

Leave the Search Scope: at All Records & Events/Attributes and tick Fact Place fields but clear all the other Basic Filters. Enter the Search and Replace change required and click the Search & Replace button. The Confirmation dialogue must be stepped through to select which Place names to Replace and which to Skip.

Alternatively, if Place names can also occur elsewhere then tick appropriate options in the Extra Filters tab, but DO NOT tick Record Names/Titles with either All the Record Types or Place Name (_PLAC.TEXT) selected as that risks changing existing Place records.

This technique may leave residual unused Place records with 0 links, that may need to be Deleted or Merged with new blank Place records to migrate the details such as Lat/Longitude, Media, etc.

Return to top.

LUA Pattern Mode

See Understanding Lua Patterns for details of the formats used.

Example 1

Assume you want to find every number with a letter suffix such as 1st, 32nd, 53rd, 94th, 15Km, 39grms, 100Mb, etc.

In the Search box enter %d+%a+ which matches one or more digits followed by one or more letters.

Ensure that LUA Pattern Mode is selected, and every Filters check box is ticked.

Click the Search ONLY button and in each Confirmation prompt click the Report button.

When the search is finding what you want, clear the tick from Confirm every item found, and click the Report button again.

A Result Set of the required fields will be displayed.

Example 2

As an example, if you have accidentally entered several Date fields with years such as 9103 and 9107 instead of 1903 and 1907 then this is how to correct them.

Ensure that LUA Pattern Mode is selected.

In the Search box enter 91(%d%d) which matches 91 followed by a capture of any two digits.

In the Replace box enter 19%1 which substitutes 19 followed by the captured two digits.

Select and process the Date fields as described in the Date Error Correction example above.

You may need to experiment with the Search and Replace text until you achieve the desired changes.

While experimenting it is advisable to use the Skip button and Cancel button, which will return to the Major Options tab to facilitate altering the Search and Replace text until correct.

Return to top.

Return to the Search and Replace main help page.


Plugin Search and Replace

Help content on this page is owned and provided by Mike Tate, the plugin's author, Calico Pie takes no responsibility for its content.