Item Status and Item Type Filtering

In Webpac you can filter your keyword searches using any field in an item record, such as Item Status or Item Type. You can even filter against multiple fields in the item record, such as items that are fiction and that are also currently checked in.

For WebPAC to filter Item Table information, you first need to use the Horizon Table Editor to define the restriction criteria for the PAC flavor that WebPAC is using. This involves updating two tables,

STEP 1.
In the Horizon Table Editor, open the "restriction" view for the Title Restriction table.

STEP 2.
Either select an existing restriction and click "Edit" to determine if it already meets your needs, or click "New" to create a new restriction.

STEP 3.
Determine whether the fields of the existing restriction record meet your needs, or fill in the fields of the new restriction record with the information that you need WebPAC to filter by.

  • The Restriction field is the case-sensitive unique code that will be added to the WebPAC HTML Search Template file.

  • The Description field is any text clearing describing the type of restriction and does not apply to WebPAC.

  • The Definition blink (box) contains one or more groups of actual restriction information against individual fields in the item table.

    • The Ord field is the order in which multiple restrictions will be applied. If you are only restricting against values in a single field of the item table, this can be any positive integer (such as 1), otherwise it is usually a good idea to use numbers that are multiples of ten (10, 20, 30, etc.) so that there will be room at add further restrictions in any order later.

    • The Item Table Column field is the exact name of the field (column) in the item table (such as itype, item_status, call, copy, volume, price, etc.) containing the value or values to apply to the WebPAC filter.

    • The Exclude radio button field defaults to "Include", which means that items whose field value equal to one of the following values will be included in the results of the WebPAC keyword search using the filter. If the "Exclude" radio button is selected, only items whose field value is not equal to one of the following values will be included in the results of the WebPAC keyword search using the filter.

    • The Value(s) field is a comma-separated list of one or more values stored in the field of the item table items that will be included (or excluded) in the results of the WebPAC keyword search using the filter. Each value should be surrounded by single or double quotes if it is a character or string, or by no quotes if it is a number (any numerical value).

      If you don't know the value or values to include, use the Horizon Table Editor to open the view for the item table field that you are filtering by. For example, if you open the "item_status" view you will see a list of Item Status code values (such as "o" for Checked Out and "i" for Checked In).

STEP 4.
Once all the fields have been filled in with the information necessary for the WebPAC filter, click "Save" to save the new restriction, then click "Close" to close the new or previous restriction that you accessed.

You are now ready to add the item restriction that you found or created to the restrictions for the PAC flavor used by WebPAC.

STEP 5.
In the Horizon Table Editor, open the "pac_restriction" view for the Restrictions for PAC by Flavor table.

STEP 6.
Click "New" on the list of restrictions by PAC flavor, and fill in the fields to link the restriction to the PAC flavor used by WebPAC.

  • The Search field is the case-sensitive unique code representing the PAC flavor used by WebPAC. This flavor is specified in the /f argument to the Zserver program and the /f option of the pacSPUD variable defined in the "webpac.ini" and "webpac.cfg" files for Patron Empowerment and Reserve Searching.

  • The Restriction field is the case-sensitive unique PAC Restriction code you just created or found.

  • The Order field is a unique number that determines where the current restriction within the PAC flavor used by WebPAC will appear in the list of restrictions for the specific PAC flavor. It does not set the order of the filters in WebPAC.

  • The Label field is any text clearing describing the type of restriction and does not apply to WebPAC.

STEP 7.
Once all the fields have been filled in, click "Save", then click "Close" to finish creating the link between the item table field restriction criteria and the PAC flavor.

You have now completed all the work needed by the Horizon Table Editor, and are ready to proceed with the modifications to the WebPAC Connection CFM file and HTML Search Template file.


STEP 8.
Add the Item Restriction Use attribute (9901) to the Connection CFM file used by WebPAC.

 WebPAC 1.2, Connection CFM, Search Types Section
  # Name Qualifier Category Use Structure Truncation Relation Position Completeness Scannable Normalize  
  Item Filter, ITFIL, 0, 9901, 2, 100, 0, 0, 0, 0, 1,  

 WebPAC 1.3, Connection CFM, SearchAttributes Section
  // Name Qualifier View Category Scannable Normalize Attribute Set ID   Use Structure Truncation      
  [Item Filter, ITFIL, BRIEF, 0, 0, 1, BIB1,  [  [1,9901,] [4,2,] [5,100,]] ]
Note that in WebPAC 1.3 the Z39.50 attribute type/value pairs, surrounded by square brackets, are usually placed on a separate line, and the closing bracket on a third.

STEP 9.
Modify the HTML Search Template file to include the case-sensitive PAC restriction code you created or found using the Horizon Table Editor and the case-sensitive Item Table Filter Qualifier code you added to the Connection CFM file.

This usually involves adding a select list or drop box option containing the filtering code to the template file. For example,

     WebPAC 1.2, Search Template
    <font size="-1">Limit Keyword Search to:</font><br>
    <select name="ITFILTER">
        <option value="">All Materials
        <option value=" and av.ITFIL.">Audio/Video Materials
    </select>

     WebPAC 1.3, Search Template
    <font size="-1">Limit Keyword Search to:</font><br>
    <select name="ITFILTER">
        <option value="">All Materials
        <option value=" and ITFIL av">Audio/Video Materials
    </select>

Alternatively, you may add a check box for filtering against an individual code. For example,

     WebPAC 1.2, Search Template
    <input type="checkbox" name="ITFILTER" value=" and ItemCI.ITFIL.">
    Limit Keyword Search to checked in items.

     WebPAC 1.3, Search Template
    <input type="checkbox" name="ITFILTER" value=" and ITFIL ItemCI">
    Limit Keyword Search to checked in items.

STEP 10.
If necessary, modify all occurances of the value of the Search Query Command HTML Tag (the tags having the name "SCMD") within the HTML Search Template file, to include the name of the HTML Select Tag, formatted as $${tagname}, containing the search filter option. For example,

    <input type="Hidden" name="SCMD"
      value="${RUNKEY} ${SESSIONKEY} $${QUERY} $${INPUT} $${ITFILTER}">

 


Copyright © 1999-2000 epixtech, inc. All rights reserved.
Please email any comments, questions & suggestions to p.roberts@epixtech.com