Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Working with Indication Rules

    Translatable
    To work with indication rules, you must have one of the following roles (the same roles as required for using the MD Editor):
    • Cataloger
    • Catalog Manager
    • Catalog Administrator

    Indication rules are used to filter sets. Indication rules do not modify data. They are solely used to read records that are part of a set and filter records out based on conditions. The result of the filtering process is a new set that is created that is a subset of the original/filtered set. See Filtering Sets on the Managing Search Queries and Sets page for more information.
    Indication rules are used for MARC bibliographic records, while XML indication rules are used for Dublin Core records.
    The following sections describe how to create and test indication rules and provide examples that you can incorporate into your workflow:
    Indication rules are relevant only for Resource Management content types.
    In addition, you can compose indication rules for other functional areas that use sets:

    Creating Indication Rules

    You create and maintain indication rules through the MD Editor.
    For Network Zone consortia members, users can control whether to save new rules locally or in a network institution. To make this selection, open the Records or Templates area, and go to New > Placement Options. Note that this selection is per user.
    To create indication rules:
    1. Open the MD Editor.
    2. Select File > New > Indication rules. The Indication Rules Properties dialog opens.
      Properties_Dialog_Box_2.png
      Indication_Rule_Properties_Dialog_Box_3_NL.png
      Properties Dialog Box
    3. Indicate the name for the rule and a description that would help other users to know what the rule does. 
    4. In "Type" dropdown, select whether to create the rule as Drool (for MARC bibliographic records) or as XML (for Dublin Core records).

      Ignore the "Enable" checkbox, as it is currently disabled. 

    5. Indicate whether to create the rule as Private or Shared. This determines in which folder the indication rule is saved. You may want to save indication rules to the Private folder and test them first, before moving them to the Shared folder (by changing the Properties). Private indication rules cannot be used in the "Filter Set" functionality invoked from the Manage Sets page. Note that the Community folder has indication rules that you can copy to create your own indication rules.
    6. Select Save in the dialog. The MD Editor editing pane opens.
    7. Create your rule as per the below:
      • If you selected to create an indication rule for MARC records, enter the Drools logic for your indication rule. Refer to the section Normalization Rules – Syntax and Examples for the syntax to use when creating indication rules. The following indication rules are provided in Alma:
        MultiTitleIndication.dslr BriefIndication.dslr
        Indication_Rule_Example_OTB_1.png
        Indication Rule Provided (Multiple Titles)
        For this rule, conditions do not exist for the control fields.
        Indication_Rule_Example_OTB_2.png
        Indication Rule Provided (Brief Subjects)

        See the Indication Rules Syntax Examples section for more examples.
        While it is permissible to include multiple Boolean Operators in the rules, when a large number of Boolean operators are selected, slower performance is likely to result. Thus, each rule should include no more than 200 Boolean operators.
      • If you selected to create an XML indication rule for Dublin Core records, enter the indication rule in XML format.
    8. Select Save.

    Testing Indication Rules

    Prior to running a job to filter a set using an indication rule, you may want to test the rule within the MD Editor.
    To test indication rules that you have created:
    1. Open a bibliographic record in the MD Editor.
    2. Select Edit > split mode icon.png Split Editor.
    3. Select the Rules tab in the left pane and expand the Indication rules folder.
    4. Locate the rule that you want to test in the Private or Shared (not the Community) folder. Select the rule to see a list of actions:
      • Edit
      • Delete
      • Contribute to CZ
      • Duplicate
      • Properties
    5. Select Edit. The indication rule opens in the split screen next to the bibliographic record.
      Indication_Rule_Open_in_Split_Screen_2.png
      Indication_Rule_Open_in_Split_Screen_2_NL.png
      Indication Rule Open in the Split Screen
    6. Select Try it . Depending on the results, a pop-up appears with either True or False response indicating that the bibliographic record either met or did not meet the Drool logic in the indication rule. 
      Indication_Rule_Try_It_Response_2.png
      Indication_Rule_Try_It_Response_2_NL.png
      Indication Rule - Try It response

    Indication Rules for MARC Records - Syntax Examples

    Examples of indication rules syntax are provided below and at Alma Indication Rule Examples. See Conditions for more information. 

    In rules that search for a certain term, use an asterisk to find the exact term. If the subfield contains anything in addition to the term, it will not find it, unless there is an asterisk. Note that you only need to place the asterisk at the end of the term, no need to place it at the beginning.

    rule "130|a|Bible."
    when
    exists "130.a.Bible*"
    then
    set indication."true"
    end

    The line exists "130.a.Bible" works as an "Equals" search, thus if the subfield contains anything in addition to the term, it will not find it, unless there is an asterisk..

    Example 1
    Identify records in a set containing $a in the 949 field.
    rule "Contains 949 with subfield a"
    when
    exists "949.a.*"
    then
    set indication."true"
    end
    Example 2
    Identify records in a set containing a 1XX or 6XX or 7XX in $0 (subfield zero).
    rule "Contains a 1XX or 6XX or 7XX subfield 0"
    when
    ((exists "1**.0.*") OR (exists "6**.0.*") OR (exists "7**.0.*"))
    then
    set indication."true"
    end
    Example 3
    Identify records in a set containing $0 (subfield zero) in a field that starts with 65 such as 650 or 659.
    rule "Contains a 65X subfield 0"
    when
    exists "65*.0.*"
    then
    set indication."true"
    end
    One asterisk is used for each numerical digit in a field tag when used as a wildcard when creating indication rules.
    Example 4
    Identify records in a set containing $0 (subfield zero) in a field that starts with 6 such as 600, 630, 650, or 659.
    rule "Contains a 6XX subfield 0"
    when
    exists "6**.0.*"
    then
    set indication."true"
    end
    Example 5
    Retrieve all records which have multiple 300 fields each having a subfield a.
    rule "Retrieve all records which contain two subfield a occurrences in 300"
    when
    existsMoreThanOnce "300.a"
    then
    set indication."true"
    end
    Example 6
    Create a set of all the records that have duplicate subfields x and z in fields 630 and 650.
    rule "Find duplicates 630 and 650"
    when
    recordHasDuplicateSubfields "630,650" "xz" ".,"
    then
    set indication."true"
    end
    See the Alma Indication Rule Examples page in the Developer Network for more examples of indication rules.

    XML Indication Rules for DC Records - Syntax Examples

    The following are examples of syntax for XML indication rules.
    Example 1
    The following is an example of an XSL indication rule that returns True if the record has a dc:subject field:
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
    <xsl:output method="text" encoding="UTF-8"/>
    <xsl:template match="/">
    <xsl:variable name="indication" select = "boolean(//dc:subject)" />
    <xsl:value-of select="$indication" />
    </xsl:template>
    </xsl:stylesheet>
    Example 2
    The following is an example of an XSL indication rule that returns False if the record has a dc:subject field that equals Theology:
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
    <xsl:output method="text" encoding="UTF-8"/>
    <xsl:template match="/">
    <xsl:variable name="indication" select = "not(boolean(//dc:subject='Theology'))" />
    <xsl:value-of select="$indication" />
    </xsl:template>
    </xsl:stylesheet>
    Example 3
    The following is an example of an XSL indication rule that returns true if the record has a dc:creator field or a dcterms:creator field containing Tolstoy:
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
    <xsl:output method="text" encoding="UTF-8"/>
    <xsl:template match="/">
    <xsl:variable name="indication" select = "boolean(//dc:creator[contains(.,'Tolstoy')] or //dcterms:creator[contains(.,'Tolstoy')])" />
    <xsl:value-of select="$indication" />
    </xsl:template>
    </xsl:stylesheet>

    Form-Based Indication Rules

    All users can create indication rules.

    Ex Libris provides the ability to create indication rules in the MARC format using a structured form, thus making the process easy and intuitive (this new functionality is in addition to the existing abilities to create Drool rules in the MARC format and create XML rules in the DC format manually, both of which remain unchanged).  For complete information about indication rules, see Working with Indication Rules.

    The structured form allows to enter the different fields and subfields and values in a wizard-like fashion, and provides pop-up assistance when entering tags and tag names. Once you have created a rule, the structured form enables testing that the rule works as you expect it, before deploying it. 

    This functionality is disabled by default. To enable it for your institution, contact Customer Support

    Limitations

    • Currently you can create only MARC21 form-based indication rules. The ability to create form-based indication rules for other formats will be added in the future. 
    • Eventually, the indication rules are used in Alma to retrieve records and assist users in filtering sets. The form-based method of creating indication rules will be incorporated in these processes in the future.

    New Form-Based Indication Rules

    The "Form" type of indications rules was introduced. This type has the same rule actions as the other indication rules (New, Edit, Delete, Duplicate, Contribute to CZ, etc.). When creating a new form-based rule, this rule receives the badge 'Form' in the Metadata Editor. 

    form_badge_on_MDE.png

    Creating a Form-Based Indication Rule

    To create a form-based indication rule:
    1. Open the Metadata Editor > Rules area.
    2. Select New > Indication. The Indication Rules Properties dialog opens.
      New indication rule form with new fields.png
    3. Under "Name", name your rule and under "Description" (optionally) provide a description that will help other users to understand what this rule does. 
    4. Under "Type", select whether to create the rule as Drool (for MARC bibliographic records), as XML (for Dublin Core records), or as Form. 
    5. Under "Access Level", indicate whether to create the rule as Private or Shared. This determines in which folder the indication rule is saved. You may also want to save indication rules to the Private folder and test them first, before moving them to the Shared folder (by changing the Properties). Private indication rules cannot be used in the "Filter Set" functionality invoked from the Manage Sets page. Note that the Community folder has indication rules that you can copy to create your own indication rules.
    6. Under "Record Type", select whether the rule will be used to create sets of bibliographic or authority records. 
      In the future, it will also be possible to create sets of Holdings.
    7. Under "Format", select the registry for the type of sets. The available options are determined by the formats active in your system.
    8. Select Save in the dialog. The MD Editor editing pane opens.
    9. In the right-hand panel of the Metadata Editor, configure your rule as per the Configuring the Indication Rules section below.
    10. Select Save.

    Configuring the Indication Rules

    Once you created the form-based indication rule, a panel opens where you can configure its conditions. An indication rule can be composed of one or more conditions.MDE indication rule fields breakdown.png

    Creating Indication Rules Manually or with System Assistance

    You can create an indication rule in one of these ways:

    • Manually typing in the information of the field on which the query is performed.
    • Using pop-up assistance to help you select the desired field. The pop-up assistance derives its information from the metadata profile defined in your system (see Configuring Cataloging)
    To manually type in the information: To use the pop-up assistance:
    1. In the first field of the condition, type in the desired field tag. 
      Alma automatically fills in placeholders for the required number of indicators, positions, and sub-fields, in the form of asterisks (*). The format differs for the different fields. 
    2. Manually replace the asterisks with the desired indicators, positions and sub-fields.
      For example:
      filling in form based fields manually.png
    1. In the first field of the condition, click the arrow to the right of the field.
    2. In the dropdown that opens, enter partial or complete description of the tag or the name. 
    3. A pop-up opens that suggests the fields that match the information you entered (the matching is done using the relevant profile for the rule according to its format and registry). Select the desired field.working_with_popup_assistanc.png
    4. Select Done

    Defining Fields for Form-Based Indication Rules

    For the different types of fields, different rule syntax is displayed.

    To define fields for the indication rule:
    1. In the conditions, define the fields as follows:
      Field Type Inputting fields of this type

      Control fields 001 / 003 / 005 / 009

      To input a control field 001 / 003 / 005 / 009:
      1. Type in (or select using the pop-up assistance) the field's tag.  
      2. Select the desired comparator.
      3. Enter free text. 
        inputting_simple_fields.png

      All other control fields

      To input other control fields:
      1. Type in (or select using the pop-up assistance) the field's tag.  
      2. If you are inputting the LDR, 006, 007, or 008 field, in the "Positions" dropdown, select the relevant position and select DoneMDE indication rule 008 field wizard.png
      3. Select the desired comparator.
      4. Enter free text. 
      Data fields -  including fields that are not in the metadata profile (e.g. fields defined locally)

      To input a data field:

      1. Type in (or select using the pop-up assistance), the field's tag. 
      2. Select the desired indicators and subfields and select Done.
      3. Select the desired comparator.
      4. Enter free text.

      inputting data fields.png

      • If you do not specify any value for an indicator/subfield, in the condition this is displayed as '*' and is interpreted by Alma as "any value".
      • To indicate an empty (undefined) value for indicators (in the fields that allow it), type in the '#' value .
      • When you enter text in the "Value" field, Alma does not attempt to validate the text. This enables you to choose a non-valid value for data correction purposes.
    2. To add more conditions, or groups of conditions, Working with Indication Rules see below. 
    3. Select Save on the toolbar to save the indication rule. 

    Testing a Form-Based Indication Rule 

    Prior to running a job to filter a set using an indication rule, it may be a good idea to validate that your rule may works as desired; and if it does not, to edit it some more. You can test the entire rule or only a single group of conditions within the rule. 

    To test the indication rule:
    • Once you have created and saved your rule, click test profile icon.png above the rule.
      Depending on the results, a pop-up appears with either a True or False response, indicating that the bibliographic record either met or did not meet the logic specified in the indication rule. 

      New indication rule testing.png

      Working with Form-Based Indication Rules

      Option  Description
      To add additional condition to the rule
      • Select plus sign.png above the condition to add another condition. 
      • Select copy icon.png to the right of the condition and duplicate this condition ; then edit the new condition as necessary. 
      To add a group of conditions to the rule When creating an indication rule, you can either add individual conditions or create groups of conditions.  Select plus group sign.png above the condition lines and add as many conditions as necessary.

      However, not that you can only add up to 3 nested levels of conditions in the form-based rules.

      opening a group of fields in indication rule.png

      To change the relationship between groups of conditions

      Baseline conditions default to an AND relationship, meaning that each condition must be true to retrieve the bibliographic record. When adding a group of conditions, you can change the relationship within the group to OR. In this case, the bibliographic record will be retrieved when either of these conditions is true. 

      Note that only the fields that you included in the rule are used to retrieve records. Fields that you did not include in the rule do not affect the retrieval, meaning that records with any values in these fields will be retrieved.

      Click on any Boolean operator between the conditions. Flags for AND and OR will appear at the top of the list. Click a flag to select this type of relationship. To stop displaying these flags, click again on the Boolean operator.
      changing the type of relationship between groups.png

      While it is permissible to include multiple Boolean Operators in an indication rule, when many of Boolean operators are selected, slower performance is likely to result. Thus, each rule should include no more than 200 Boolean operators.

      To remove a condition Select the X right of the condition to remove it from the rule.
    • Was this article helpful?