Rules for Requesting

If you do not have permission to access the ASAA function, you can view the Rules for Requesting file in the Admin Corner.

The Rules for Requesting file contains the logical rules that determine whether a title can be requested in WebPAC. Separate rules can be set up to control requestability of a title based on the contents of its bibliographic, order, or item records. For example, one rule can be set up to deny a request if the title's bibliographic record is not linked to an item record and another can be set up to deny a request for items with a status of 'n' (BILLED).

To prevent the requesting of titles that have been suppressed from display, make certain that all entries in the Rules for Suppression file also appear in the Rules for Requesting file.

Data Elements

The rules are read from the beginning of the file, continuing to the end. As the system reads each rule, if any of the associated records meets the conditions in that rule (that is, the rule "tests true"), then the title is blocked from requesting. If all rules in the Rules for Requesting file "test false" for all associated records, the title can be requested in the public catalog.

Note the following when editing this file:

The structure of a rule line is:

   q|i||88||=|m||This title cannot be requested
   | || | | | || |
   | || | | | || `---  Message
   | || | | | |`---  Target2
   | || | | | `---  Target1
   | || | | `---  Operation Type
   | || | `---  Rule
   | || `---  Fixflds Line#
   | |`---  Variable Tag
   | `---  Record Type
   `---  Logic Operator

Logic Operator

Contains a single character that controls the grouping of adjacent lines into one rule.

Possible values are:

Element
Value
Meaning
^ The condition on this line is ANDed with the condition on the following line.
v The condition on this line is ORed with the condition on the following line.
q Denotes the last line of the rule (i.e., quit).

All rules must end with a line containing the 'q' logic operator.

Record Type

The type of record to which the rule applies. All condition lines for a given rule must contain the same record type, which can be one of the following:

Element
Value
Record Type
b bibliographic
i item
o order
I INN-Reach item—Do not use I as a record type in any of your rules. The INN-Reach record type is reserved for use only in the Rules for Requesting file at the CENTRAL machine, where it determines which attached item to check when requesting over the network from the central machine. Only the Innovative Interfaces Union Database Department staff can edit the central machine's Rules for Requesting file.

Variable Tag

Used for testing variable-length fields only, although this element is almost exclusively used to test the LINK REC tag. Specifies the field group tag of the variable-length field to test. This element is NULL or BLANK if the tested field is a fixed-length field.

Fixflds Line#

Used for testing fixed-length fields only. Specifies the line number of the fixed-length field in the fixed-length fields file. You can find the number of a particular fixed-length field by viewing the list displayed in the Long Names for Fixed Length fields file. This element is NULL or BLANK if the tested field is a variable-length field.

Rule

If the Variable Tag element contains an III tag, this element can contain further specifications about the variable-length field to be tested; otherwise it is NULL or BLANK.

Values that can appear in this element are:

Operation Type

Logic that the data in the specified tag must meet for the rule to deny the request. This defines the relationship that must exist between the data in the specified field in the tested record and the value(s) in the Target1 and Target2 elements that follow. Possible values are:

Operator Description
= Equal to
g Greater than or equal to
> Greater than
< Less than
l Less than or equal to
~ Not equal to
w Between
h Has
e Exists
n Does not exist

For all operation types other than w (between), the value against which to test the field is contained in the Target1 element. For the w operation type, the field's value must be between the values in the Target1 and Target2 elements.

Target1

Value against which to test the field. If this element is NULL, then the request is denied if the field in the Variable Tag or Fixflds Line# element does not exist in the tested record. Wildcards are not supported.

For testing LINK REC fields, this value is the number of occurrences of the field that the tested record must contain to deny the request. A value of '0' means that the tested record must contain NO occurences of the field.

Target2

Used with the w (between) operator only to specify the second value for the Variable Tag or Fixflds Line#. This element is NULL for other operators. Wildcards are not supported.

Message

If the Logic Operator element is q, that is, this is the last line in the rule, then the string in this element is displayed to users if the rule has denied the request. This element can contain internationalized messages. Note that if two or more request elements prevent the same request, the system may display the message "No requestable items".

About HTML Code

You can use HTML codes in the Message element to create special text formatting in WebPAC.

Editing the Rules for Requesting File

  1. In the Select file drop-down menu in the ASAA function, choose Rules for Requesting and then Select.
  2. The Message element in the Rules for Requesting file can be internationalized. This allows you to enter similar messages in more than one language and the system will display the appropriate one, depending on the current language. For information on adding or editing internationalized messages, see Internationalized Rule File Messages.
  3. See About the Rule Files for information on editing rule files.
  4. Enter your changes.

    Before saving changes to the Rules for Requesting file, review Tips for Editing Rule Files to make sure your changes are correctly formatted and error-free.

  5. Select OK.
  6. Select the Save tool to save your changes.
  7. Restart the automatic processing of patron requests program and all WebPAC servers running on your Innovative machine(s).

Annotated Examples

Single Line Rule

Deny a request if there are no item records linked to the title's bibliographic record:

q|b|^||i|=|0||Sorry, this title is not requestable.

Data Element Value Meaning
Logic Operation q Last line of rule
Record Type b Test the bib record
Variable Tag ^ Test the LINK REC field
Fixflds Line# NULL Unused for this rule
Rule i Type of linked record
Operation Type = Field must equal the value in the Target1 element to deny the request
Target1 0 Value that will deny the deletion
Target2 NULL Unused for this rule
Message ..... Message to display if the request is denied

Multiple Line Rules

Deny a request if the item record STATUS field is '-' (Available) and the item record LOANRULE field is '0', meaning the title is not checked out:

^|i| |88||=|-||
q|i| |87||=|0||Available titles cannot be requested.

Line One

Data Element Value Meaning
Logic Operation ^ AND this line with the next line
Record Type i Test the item record
Variable Tag BLANK Unused for this rule
Fixflds Line# 88 Test fixed-length field 88 (STATUS)
Rule NULL Unused for this rule
Operation Type = Field must equal the value in the Target1 element to deny the request
Target1 - Value that will deny the request (Available)
Target2 NULL Unused for this rule
Message   No message in first line of a two-line rule

Line Two

Data Element Value Meaning
Logic Operation q Last line of rule
Record Type i Test the item record
Variable Tag BLANK Unused for this rule
Fixflds Line# 87 Test fixed-length field 87 (LOANRULE)
Rule NULL Unused for this rule
Operation Type = Field must equal the value in the Target1 element to deny the request
Target1 0 Value that will deny the request
Target2 NULL Unused for this rule
Message ..... Message to display if the request is denied

Additional Examples

Deny a request if the item STATUS field is equal to 'r' (IN REPAIR):

q|i||88||=|r||Material in repair cannot be requested.

Deny a request if the bib BCODE2 field is equal to 'b' (ARCHIVE):

q|b||30||=|b||Archival materials cannot be requested.

Deny a request if the item IMESSAGE field is equal to 'f':

q|i||97||=|f||This title cannot be requested.

Deny a request based on a group of item ITYPE values:

v|i||61||=|003||
v|i||61||=|004||
v|i||61||=|007||
v|i||61||=|009||
v|i||61||=|024||
v|i||61||=|025||
v|i||61||=|141||
q|i||61||=|200||Sorry, this material cannot be requested.

Deny a request based on storage and display case item LOCATIONs where multiple storage locations begin with stg, for example, stga, stgrr, and so forth:

v|i||79||w|stg|stgz|
q|i||79||=|dsply||This title is not currently requestable.

Deny a request based on a group of item STATUSes:

v|i||88||=|n||
v|i||88||=|$||
v|i||88||=|m||
v|i||88||=|z||
v|i||88||=|p||
v|i||88||=|s||
v|i||88||=|b||
q|i||88||=|r||Sorry, this title cannot be requested.

Tips for Blocking Requests Based on Attached Records