Skip to Main Content

User Interfaces Standing Committee

Working site for the UISC

Custom Contents Display Field

Custom Contents Display Field

Objective: Out-of-the box formatting of the 505 (contents) field is one long block of text. This norm rule formats the 505 field in a list, with each entry on its own line.

Before:

After:

How to Accomplish This:

  1. In Alma, go to Discovery > Manage Display and Local Fields.
  2. Locate the contents field, and from the three dots in its row, choose Edit.
  3. In the MARC21 normalization rule section, select the three dots and choose Edit.
  4. Replace the code with the revised norm rules: rule "Primo VE - contents 505"
    when

    MARC."505" has any "g,t,r"

    (MARC."505"."t" match ".*" OR MARC."505"."g" match ".*") AND NOT MARC."505"."r" match ".*"

    then

    set TEMP"1" to MARC."505" sub without sort "g,t" wrap subfields

    replace wrapping delimiters (TEMP"1","g","","<br>")

    replace wrapping delimiters (TEMP"1","t","","<br>")

    replace string by string (TEMP"1","Research articles:","Research articles:<br>")

    replace string by string (TEMP"1","--","")

    create pnx."display"."contents" with TEMP"1"

    end

    rule "Primo VE contents 505r"

    when

    MARC."505" has any "g,t,r"

    (MARC."505"."t" match ".*" OR  MARC."505"."g" match ".*") AND MARC."505"."r" match ".*"

    then

    set TEMP"1" to MARC."505" sub without sort "g,t,r" wrap subfields

    replace wrapping delimiters (TEMP"1","g","","")

    replace wrapping delimiters (TEMP"1","t","","")

    replace wrapping delimiters (TEMP"1","r","","<br>")

    replace string by string (TEMP"1","Research articles:","Research articles:<br>")

    replace string by string (TEMP"1","--","")

    create pnx."display"."contents" with TEMP"1"

    end

    rule "Primo VE - contents 505a"

    when

    MARC is "505"."a"

    then

    set TEMP"1" to MARC."505" sub without sort "a"

    replace string by string (TEMP"1","(--|;)","<br>")

    create pnx."display"."contents" with TEMP"1"

    end

    rule "Prima_Display - contents 880-505"

    when

    MARC is "880" AND

    MARC."880"."6" match "505-.*"

    then

    create pnx."display"."contents" with MARC "880" excluding num subfields without sort

    end

  5. Click Save for the norm rule and Save for the field.
  6. On the page that lists the fields (which you should be returned to), select Apply rules.

Code credit: Santa Fe College, based on code shared on the Primo VE listserv October 19, 2021 ("Primo VE : Table of Contents" thread)