Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Primo

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Primo
    3. Community Knowledge
    4. Primo VE - set Author names in natural order (FirstName LastName) for Alma records

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

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    No headers
    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.

     




    Report
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Primo VE - Customization guide September 2018
      • Primo VE: Hiding specific facets
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Community Content Type
      How To
      Language
      English
      Product
      Primo
    2. Tags
      This page has no tags.
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved