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

    How to – Alma Analytics – Using Nested REPLACE formula to remove subfield delimiters

    Created By: Stacey van Groll
    Created on: 12/06/2019

    This is a practical example of how you can use the REPLACE formula, with nested expressions, to remove the subfield delimiters as needed for specific reports.


    Ex Libris offers the option to map 10 additional bibliographic fields into just your site’s Alma Analytics as ‘Local Param’ 01 through 10.  From January 2018, these no longer had to include a 9 in any position (even though they’re still called ‘Local’).  Also in January 2018 came the option to display your Alma subfield delimiter between the subfields in Alma Analytics.  This is very handy at times, so we have this enabled, but other times you really don’t want it in your output.


    We mapped 300 for Physical Description into Local Param 04


    Original data from Alma looks like this in the Bibliographic Record (MD Editor)

    300         __ |a [xvi], 340 p. : |b ill. (chiefly col.) ; |c 24 cm.


    Alma Analytics data looks like this in Local Param 04

    $$a [xvi], 340 p. :; $$b ill. (chiefly col.) ;; $$c 24 cm.


    I want to remove the $$a and the ; $$b and the ; $$c so that Alma Analytics looks like the original data, like this

    [xvi], 340 p. : ill. (chiefly col.) ; 24 cm.



    • Criteria tab: Add your Local Param 04 field to your report
    • Click on the field to show the editing options (little icon with horizontal lines)
    • Choose Edit Formula
    • Copy and paste the formula below over the original highlighted text (or delete the original and paste in the new)
    • Tick the box for Custom Headings
    • Type in a meaningful Column Heading, such as Physical Description (300)
    • Click Ok
    • Go to the Results tab to see the output


    Your Edit Column Formula box should look like this just before you click OK




    Removing $$a subfield delimiters

    REPLACE("Bibliographic Details"."Local Param 04", '$$a', '')

    $$a [xvi], 340 p. :; $$b ill. (chiefly col.) ;; $$c 24 cm.


    [xvi], 340 p. :; $$b ill. (chiefly col.) ;; $$c 24 cm.


    Removing $$a and $$b subfield delimiters

    REPLACE(REPLACE("Bibliographic Details"."Local Param 04", '$$a', ''),’; $$b’, ‘’)

    $$a [xvi], 340 p. :; $$b ill. (chiefly col.) ;; $$c 24 cm.


    [xvi], 340 p. : ill. (chiefly col.) ;; $$c 24 cm.


    Removing $$a and $$b and $$c subfield delimiters

    REPLACE(REPLACE(REPLACE("Bibliographic Details"."Local Param 04", '$$a', ''),’; $$b’, ‘’),’; $$c’, ‘’)

    $$a [xvi], 340 p. :; $$b ill. (chiefly col.) ;; $$c 24 cm.


    [xvi], 340 p. : ill. (chiefly col.) ; 24 cm.






    If you paste in your formula and click Ok, only to see a Formula syntax is valid message – don’t ignore this.

    If you look closely at the first line with the X, you’ll see that the quotation marks look different to the quotation marks on the second line.

    In sum, sometimes when copying and pasting formula like this, especially from Word, the quotation marks can go a bit hinky.  Just carefully delete and replace each one by typing in the quote marks manually (or don't use Word for formula!).

    You may also see this message if you have typed the formula in manually and you haven’t paid enough attention to single vs double quotation marks.  These are very important.  The quotation marks around the original expression are double, for example “Bibliographic Details.Local Param 04” but the quotation marks for the replacement expressions are single, for example all of these are single  ),’; $$c’, ‘’)

    Feedback or suggestions

    Stacey van Groll

    Discovery and Access Coordinator

    University of Queensland