Creating Field Selectors for Record Fields
This procedure describes creating a field selector from the data in a record field.
If the data from a record field requires manipulation before you use it in a data test, you can apply a regular expression to the data and use the result as the field selector. If a regular expression is specified, Pathfinder Pro uses the result of the regular expression as the value of the field selector.
Pathfinder Pro field selectors accept regular expressions such as POSIX Basic Regular Expressions (BREs) and Extended Regular Expressions (EREs) as implemented in the UNIX grep utility.
Descriptions in field selectors are optional. The description is used to distinguish field selectors with the same or similar names. For example, field selectors can be named VOLUME and VOLUME-3DIGIT, where VOLUME-3DIGIT has the description "Converts volume to 3 digits for Project Muse." Descriptions display in the Pathfinder Pro Admin application.
To create a field selector, you enter the:
- record field from which to obtain the data
- regular expression for modifying the data (optional)
Innovative provides a wiki for field selectors that have been successfully tested with Pathfinder Pro.
Specifying the Record Field for Records in the Catalog
To specify the record field from which to obtain the data for a field selector:
- Choose Field Selectors from the menu on the left-hand side of the Pathfinder Pro home page.
The Field Selectors tab displays: - Choose Create New.
The Field Selector (new) tab displays: - Enter a Name.
The name can be a maximum of 64 characters. - Expand Library Catalog.
- Enter the regular expression in the Regular Expression text box. You can test the regular expression to ensure that it returns the expected result.
-
In the Definiton text box, enter the record type and field to use as the field selector.
Use the format:
record type/tag/marctag/subfield/Field Description record type The tag for the record type (b for bibliographic, r for course, or e for resource). Note that field selectors cannot be created for attached records (i for item, c for checkin, or o for order). If you do not enter a record type, it defaults to the main record type of the query. tag Innovative field group tag marctag The MARC tag (e.g., 022) subfield A comma-delimited list of subfields (e.g., a,g) - Choose Save.
Specifying the Record Field for Records in the Reference Databases
- Choose Field Selectors from the menu on the left-hand side of the Pathfinder Pro home page.
The Field Selectors tab displays: - Choose View.
The Field Selector (<field_selector_name>) tab displays: - Expand Reference Databases.
The Reference Databases tab displays: - Enter a definition.
- Enter a regular expression. You can test the regular expression to ensure that it returns the expected result.
- Enter the WebPAC port for the reference database.
- Choose Save.
Using Field Selectors in Data Tests
- Choose Field Selectors from the menu on the left-hand side of the Pathfinder Pro home page.
The Field Selectors tab displays: - Choose View.
The Field Selector (<field_selector_name>) tab displays: - Expand Additional Settings.
The Additional Settings tab displays: - To normalize the data from the record field before comparing it to the coverage database field, choose "Yes" for Normalize?
- Move coverage fields from Available to Selected.
The data from the record will be matched against data from the chosen coverage field that has been normalized according to system index rules. - Choose Save.
Specifying Regular Expressions
To manipulate the data in the record field into a form other than the form it takes in the record:
- Choose Field Selectors from the menu on the left-hand side of the Pathfinder Pro home page.
The Field Selectors tab displays: - Choose View.
The Field Selector (<field_selector_name>) tab displays: - Enter a regular expression in the Regular Expression text box.
Use the format:
<delimiter><match><delimiter><replace><delimiter>
For example, the following expression removes the hyphen from the ISSN field:
/-//
You can enter multiple regular expressions in one text box. Place an underscore ( _ ) between regular expressions to apply multiple regular expressions to the same data.NOTE
Innovative does not provide support or training for the construction of regular expressions.
- If necessary, test the regular expression.
- Choose Save.
Testing Regular Expressions
To manipulate the data in the record field into a form other than the form it takes in the record:
- Choose Field Selectors from the menu on the left-hand side of the Pathfinder Pro home page.
The Field Selectors tab displays: - Choose View.
The Field Selector (<field_selector_name>) tab displays: - To apply the regular expression to a value, enter the regular expression in the Test regular expression with value text box.
- To apply the regular expression to a record number, enter the regular expression in the Test regular expression with record id text box.
- Choose Apply. Pathfinder Pro displays the result of applying the regular expression to the value or the record number.
Examples of Field Selectors
Field Selector Name | Type | Definition | Regular Expression | Description |
ISSN | Library Catalog | /i/022/a/ | /-// | ISSN with hyphen removed |
ISSN-HYPHEN | Library Catalog | /i/022/a/ | /(^,{4})(.{4}$)/\1-\2/ | ISSN with hyphen |
SUBJECT | Library Catalog | /d/// | /--/ / | Subject with "--" replaced with a space. |
SUBJECT-SHORT | Library Catalog | /d//a/ | Subject, subfield a only | |
TITLE | Library Catalog | /t/245/a,b/ | Title, subfield a and b |