Skip to main content
ExLibris
  • Subscribe by RSS
  •  

    Ex Libris Knowledge Center

    Primo VE - set Author names in natural order (FirstName LastName) for Alma records

    Created By: Knut Bøckman
    Created on: 3/17/2019



    In Marc21 records, personal names are in inverted order separated by comma (LastName, FirstName). In our Discovery, we want the names to be in natural order (FirstName LastName). 

    To achieve this, we ended up using this rule for the creator field, based on Marc21 100-field:

    rule "Primo VE Display - Creator 100"
    priority 10
        when
            MARC."100" has any "a,b,c"
        then
            set TEMP"1" to MARC."100" sub without sort "a"
            set TEMP"2" to MARC."100" sub without sort "a"
            set TEMP"3" to MARC."100" sub without sort "b,c"
             set TEMP"4" to MARC."100" sub without sort "a"
             remove substring using regex (TEMP"1","^([^,]*)")
             remove substring using regex (TEMP"2",",.*$")
            remove substring using regex (TEMP"4","(/|:|;|=|,)+$")
            add prefix (TEMP"4","$$Q")
            remove substring using regex (TEMP"4","^$$Q$")
            concatenate with delimiter (TEMP"1",TEMP"2"," ")
           concatenate with delimiter (TEMP"1",TEMP"3"," ")
            concatenate with delimiter (TEMP"1",TEMP"4","")
           remove substring using regex (TEMP"1","[,.]")
            set pnx."display"."creator" to TEMP"1"
    end

    I'm sure more regex-savvy colleagues could do this in a more elegant way, but at least this one works. I invite anyone to improve on my clumsy regex and drools. We use a similar path for the 700 field (--> Contributor), of course.

    Worth noting is that if you decide to go for natural order of names, this will only affect your local records. Most, though not all, records from Primo Central give the names in inverted order, so considerable inconsistency can be expected. You should consider this before implementing this rule, and if possible check with your audience.

     




    • Was this article helpful?
https://knowledge.exlibrisgroup.com/Primo/Community_Knowledge/Primo_VE_-_set_Author_names_in_natural_order_(FirstName_LastName)_for_Alma_records
knowledge.exlibrisgroup.com
crawl=CC-MAIN-2021-25
105809
application/http; msgtype=response
sha1:N3ML7KRJ72AIRGDDBBCSNKNH6HFEDE3O
<urn:uuid:1b67db6f-c10b-47d1-91dc-33fa50957e89>
2021-06-14T21:10:02Z
99.84.216.114
text/html
sha1:H35VPTCOHLLIDLLWUCMTXXQH77ZHXDHM
<urn:uuid:dfe7b9df-77ad-45ad-8988-5598c82768a9>
https://knowledge.exlibrisgroup.com/Primo/Community_Knowledge/Primo_VE_-_set_Author_names_in_natural_order_(FirstName_LastName)_for_Alma_records
response
<urn:uuid:0534512f-d5a2-46b2-96c1-beca54f2d819>
isPartOf: CC-MAIN-2021-25
publisher: Common Crawl
description: Wide crawl of the web for June 2021
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-98.ec2.internal
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/