User Valuelist Support in MARC Report

User supplied valuelists are supported in MARC Report beginning with version 257.

To enable validation against a user supplied valuelist, goto the Validation page of the main options. At the bottom of the screen is a checkbox labeled “Validate user valuelists”–when this option is checked, the program will quickly check whether the required data files (described below) are present. If they are, the option will be enabled; otherwise a pop-up will advise that a file is missing and that this page should be consulted.

Back To Top

Setup Overview

Two text files are required to setup user valuelist validation, and these files must reside in the '\lists' subdirectory of 'Documents\MarcReport'. Each file will contain several tab-delimited columns as described below. A program like Excel is a good choice for maintaining such data, just be careful to use 'Save As Type: Text (tab-delimited)' when saving the file.

The first file is a 'map' file, which must be named 'myValuelistMap.txt'. This file will map each valuelist defined by the user to a MARC Tag and subfield. At present, up to 25 rows are supported.

The second file contains the actual values and/or codes that the program will validate against. Typically each entry in the 'map' file will link to one or more rows (up to 500) in the valuelist file. This file must be named 'myValuelist.txt'.

Back To Top

The myValuelistMap file

The 'myValuelistMap.txt' file contains 4 columns:

  1. A three-digit MARC tag and a subfield code (no spaces)
  2. The name of the valuelist (no spaces)
  3. '0', or a string to be used as a conditional match (TBA)
  4. '0', or a note to be displayed to the user when validation fails

The purpose of the map file is to link each valuelist defined by the user to a MARC content designator.

Here is a brief example of a valuelist map:

  This would be considered a comment
  // As would this. 
  346a	rda_font_size	0	0
  659A	myOwnThesaurus	0	The term should match an entry ...
  690a	myOwnThesaurus	0	The term should match an entry ...

Notes about the map

Column headers are not used in this file.

Comments are supported–any row that does not begin with a three-digit MARC tag followed by a subfield code will be ignored.

The subfield code is not case-sensitive.

A single valuelist may link to multiple Tag/Subfields, but each MARC Tag/Subfield must only appear once in a map.

The name of a valuelist must not contain any blank spaces. Either replace the blank spaces with a dash (or underscore) as above, or use a form of camelcase. Unlike the above example, however, standardize on one format for these list names, since it is the list name (and not the tag) that will link each list to its corresponding entries in the second file.

Column 3 of the map is still under development. For now, enter a '0' in column 3.

Column 4 contains a note, which may be up to 500 characters. This will display in MARC Report's “Notes” window whenever a MARC record string fails to validate against the values referred to by the list. Be careful not to add any carriage reutrns, etc., when entering the note–it must be a single string.

Back To Top

The myValuelist file

The 'myValuelist.txt' file contains 4 columns:

  1. The name of a valuelist as found in column 2 of the map (above)
  2. The value
  3. '0', or a note about a value (or a definition of it)
  4. '0', or the uri of a value (if formally defined)

The purpose of the valuelist file is to enumerate all of the values assigned to each value list defined in the map file.

Here is a brief example of a valuelist file:

rda-colour-content	monochrome	0	http://rdaregistry.info/termList/RDAColourContent/1002
rda-colour-content	polychrome	0	http://rdaregistry.info/termList/RDAColourContent/1003
rda-font-size	giant print	0	http://rdaregistry.info/termList/fontSize/1001
rda-font-size	jumbo braille	0	http://rdaregistry.info/termList/fontSize/1003
rda-font-size	large print	0	http://rdaregistry.info/termList/fontSize/1002

In the example, the third column has been truncated for readability; here is a complete example for the first row:

Column 1: rda-colour-content
Column 2: monochrome
Column 3: A colour content that consists of tones of one colour, or black and white, or black or white and another colour.
Column 4: http://rdaregistry.info/termList/RDAColourContent/1002

Notes about the value lists

Column headers are not used in this file.

Comments are supported–any row that does not begin with a three-digit MARC tag followed by a subfield code will be ignored.

Note that the subfield code is not case-sensitive.

The name in the first column must match a name that is present in the myValuelistMap file.

The value is what the MARC data will be matched against. The matching is not case-sensitive, and it will ignore ending punctuation from MARC (but not punctuation internal to the value).

The third column will be displayed when F7 is pressed in the editor to display all of the values available for a content designator.

The uri in the fourth column is not used at the present (but may someday be useful in populating $0, $1, etc.)

You can add up to 500 values for each valuelist defined in the map file.

help/uservaluelists.txt · Last modified: 2021/01/19 15:16 by richard
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported
Driven by DokuWiki Recent changes RSS feed