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.
    To create indication rules:
    1. Open the MD Editor.
    2. Select File > New > Indication rules. The Indication Rules Properties dialog opens.

      Rule_Properties_Dialog_Box_2.png
      Properties Dialog Box
    3. 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.
    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. Select Save in the dialog. The MD Editor editing pane opens.
    6. 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 Provided (Multiple Titles)
        For this rule, conditions do not exist for the control fields.
        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.
    7. 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_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_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>
    • Was this article helpful?