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:
- A maximum of thirty rules can appear in this file. Any combination of single and multiple line rules can count toward this maximum.
- Do not enter blank lines when editing the requestrl file. Each line in the file must begin with v, q, ^, or #.
- If the first character of a line is '#', the line is ignored. Use this to enter comments into the file or to turn off a rule or condition.
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.
- To test the LINK REC tag (tag ^), enter a list of record types into the Rule element.
- To test a specific MARC tag within the field group, enter it into the Rule element.
- If the record contains only MARC fields, a particular MARC field can be specified by entering M in the Variable Tag element and the MARC tag and, optionally, indicators into the Rule element.
- See the list of Special Field Codes for information on additional fields that can be specified in this element.
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:
- If the Variable Tag element is ^ (the LINK REC field), this element specifies the linked record types, either a single record type, such as i, o, and so forth, a list of record types, such as oi for both order and item records, or + for all record types. The system counts how many links exist to the specified record types and the Operation Type and Target1 elements are then used to test this count against a specified value. Note that a LINK REC rule must be a single-line rule (the ^ and vlogic operators cannot be used in a LINK REC rule).
Some examples:q|b|^||i|=|0||This is a one-line rule that tests bibliographic records for links to item records. If the number of item record links is 0, then the request is denied.q|b|^||oi|=|0||This is a one-line rule that tests bibliographic records for links to item and order records. If the number of item record and order record links is 0, then the request is denied.q|b|^|| |=|0||This is a one-line rule that tests bibliographic records for links to any type of record. If the number of record links is 0, then the request is denied. - For other variable-length fields, this element can contain a specific MARC tag with optional indicators in the form xxxii, where xxx is the MARC tag and ii is the optional MARC tag indicators, such as 04101. Only the specified MARC tag/indicator field will be tested.
- If the record contains only MARC fields, a specific MARC tag can be tested by entering M in the Variable Tag element and the MARC tag with optional indicators into the Rule element (in the same xxxii format detailed above). Note that this cannot be used to test variable-length fields in records that contain a mix of MARC and non-MARC fields such as item records.
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
- In the Select file drop-down menu in the ASAA function, choose Rules for Requesting and then Select.
- 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.
- See About the Rule Files for information on editing rule files.
- 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.
- Select OK.
- Select the Save tool to save your changes.
- 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
- If a bibliographic record has attached item records, the system will not evaluate rules based on attached order records.
- If a bibliographic record has multiple attached order records, the system will evaluate only the first attached order record against the Rules for Requesting file.
- To block requesting based on no attached order or item record:
q|b|^||oi|=|0||This title cannot be requested.
Note that in WebPAC, the BIBREQUEST Web Server option must be set to a "TRUE" value if the library is set up for automatic request processing and allows requests on bibliographic records that have no attached item or order records. - To block requesting based on no attached item record:
q|b|^||i|=|0||This title cannot be requested.
- To block requesting based on an order which is not status 'o' or status 'a' (the system will not evaluate the order if an item is present; thus, if a block occurs based on order status, the bibliographic record has no attached items):
^|o| |20||~|o||
q|o| |20||~|a||Sorry, this title cannot be requested.