Validation Routines

A content reuse widget was here but the content was missing. The reused content is Media_Repository/Primo/Primo_VE_Doc_Note

Return to menu

Validation routines are used by conditions for comparisons and do not transform or copy values. For lists of transformation routines, see Transformation Routines.

The following validation routines are available.

Spaces are indicated by a ^.

Validation Routines
Routine Name Description Example
Check characters at position

Validates that the string contains any of the character/s in the position specified in the parameter. Starting from the left, the first position is 0.

Parameter:

<position>@@<characters>

This routine can be useful to check values of MARC control fields.

The following setting makes sure that the seventh character is either a or b:

Parameter: 6@@ab

The following setting makes sure that the twenty-second character is either a space ( ) or a caret (^):

Parameter: 21@@ ^

There is a space between the last at sign (@) and the caret (^).

Checks string at position

Validates a specified string from a specified position. Starting from the left, the first position is 0.

Parameter:

<position>@@<string>

Parameter: 35@@eng

Check string equals string

Validates that the string specified in the parameter is equal to the field.

Parameter: Y

Check that string exists

Validates that the string specified in the parameter is contained in the field.

Parameter: (OcoCL)

Check that string exists in list

Validates that any of the strings (which are separated by @@ in the Parameter field) are contained in the field.

Parameter: <string 1>@@<string 2>@@<string n>...

Parameter: whatever@@nothing@@something

Check that string not exists

Validates that the string specified in the parameter is not contained in the field.

Parameter: (OcoCL)

CheckStringIn MappingTable

Checks to see if the input string is not in the specified normalization mapping table. This table can be used – for example, to prevent the creation of dedup or FRBR keys for certain titles.

Parameter - The name of the normalization mapping table that contains the strings to check.

For example, you can create a normalization mapping table called commontitles and include a list of common titles to validate:

sourceCode1 targetCode
acts acts
review review

Each string must be entered in both columns as shown above example.

Example Rule:

Source: PNX - addata/jtitle

Conditions: True

Condition 1:

Logic: True

Source: PNX - frbr/t

Success if: Match current

Routine: Check string equals string

Parameter: 2

Condition 2:

Logic: True

Source: PNX - addata/jtitle

Success if: Match current

Routine: CheckStringIn MappingTable

Parameter: commontitles

Transformation: Copy As is

Action: ADD

Examples:

Input: acts

Output: none

Input: journal of chemistry

Output: journal of chemistry

Input does not exist

DO NOT USE - will be removed.

 

Input exists

Validates that the specified field exists.

There is no parameter, only the source field.

 

Starts with character

Validates that the field starts with the character specified in the parameter.

Parameter: A

Starts with string

Validates that the field starts with the character specified in the parameter.

Parameter: (OcoLC)

Validate (use reg. exp.)

Validates that the string matches the regular expression specified in the parameter.

Parameter: Online.*

Input: Online manual

Validate Alpha

Validates that the string contains only characters.

There is no parameter.

 

Validate FMT equals

Validates the format of a MARC record based on pos 6 and 7 of the leader. See Validate FMT for details.

 

Validate Length

Validates that the length of the field is the same as the specified length in the parameter.

Parameter: 10

Validate UNIMARC FMT equals

Validates the format of a UNIMARC record based on pos 6 and sometimes position 7 of the leader. See Validate UNIMARC FMT for details.