[Wactclc-alma] FW: [Primo] [External] Primo norm rule to hide entire fields when specified language is present

Guidry, Wade WadeG at bigbend.edu
Fri Dec 3 11:42:54 PST 2021


Nice thread from SJ over on Primo-L.

Might be of renewed interest to others, given the new attention on unsavory subject headings being given by December feature coming to "disappear" those from view. So I'm cross-posting here.

And also reminder that you can also substitute alternative subject headings instead of just disappearing them.

The technique below only works for the full record display, but not for the subject facet.

So, if you want to be really proactive, you could do both (I think), but the replacement of headings in the full display, and removal of the headings in the facets.


Modifying Subject Headings for Display - Documentation - LibGuides at Big Bend Community College<https://libguides.bigbend.edu/c.php?g=1142085&p=8420081>



Wade Guidry
Library Consortium Services Manager, WACTCLC
wadeg at bigbend.edu<mailto:wadeg at bigbend.edu>
(509) 760-4474
http://www.wactclc.org<http://www.wactclc.org/>

From: Primo <primo-bounces at exlibrisusers.org> On Behalf Of Devereux, Saint-Jean via Primo
Sent: Thursday, December 2, 2021 4:42 PM
To: Stefan.Kandera at gs-vbs.admin.ch; primo at exlibrisusers.org
Subject: Re: [Primo] [External] Primo norm rule to hide entire fields when specified language is present

CAUTION: Originated outside our network. Do not click links or open attachments unless you validate the sender.


Yes! This did work. Not jazzed about using too many more Booleans, but it will do.
thanks!

sj


Saint-Jean Devereux
Library Technical Services

Shoreline Community College
library.shoreline.edu  |  206.546.6962
Pronouns: he, him / they, them

I will be working remotely until January 2022. The best way to reach me in the interim is via email.
I welcome VSRE emails. More at http://vsre.info<http://vsre.info/>



________________________________
From: Stefan.Kandera at gs-vbs.admin.ch<mailto:Stefan.Kandera at gs-vbs.admin.ch> <Stefan.Kandera at gs-vbs.admin.ch<mailto:Stefan.Kandera at gs-vbs.admin.ch>>
Sent: Thursday, December 2, 2021 2:44 AM
To: primo at exlibrisusers.org<mailto:primo at exlibrisusers.org> <primo at exlibrisusers.org<mailto:primo at exlibrisusers.org>>
Cc: Devereux, Saint-Jean <sdevereux at shoreline.edu<mailto:sdevereux at shoreline.edu>>
Subject: AW: [Primo] [External] Primo norm rule to hide entire fields when specified language is present

[ CAUTION: This email originated from outside Shoreline Community College. Do not click links or open attachments unless you recognize the sender and know the content is safe. ]



Hi,



Would the AND NOT operator work out for you?



Best regards,

Stefan







rule "Primo VE Display- Subject 650"

                when

                               MARC."650" has any "a-u,w-z" AND NOT

                               MARC."650".ind"2"  equals "2"   AND NOT

                            MARC."650"."a" match "Non-preferred term*"

                then

                               set TEMP"1" to MARC."650" subfields "a-u,w" delimited by " " remove substring using regex "\\.+$<file://.+$>"

                remove string (TEMP"1","<")

                remove string (TEMP"1",">")

                               set TEMP"2" to MARC."650" sub without sorting "x-z" delimited by " -- "

        remove substring using regex (TEMP"2","\\.+$<file://.+$>")

        concatenate with delimiter (TEMP"1",TEMP"2"," -- ")

        set TEMP"3" to multilingual by "650" "Subject" "display"

                               concatenate with delimiter (TEMP"1",TEMP"3","")

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

end





Von: Primo <primo-bounces at exlibrisusers.org<mailto:primo-bounces at exlibrisusers.org>> Im Auftrag von Devereux, Saint-Jean via Primo
Gesendet: Mittwoch, 1. Dezember 2021 23:22
An: Ehlert, Mark K. <ehle0001 at stthomas.edu<mailto:ehle0001 at stthomas.edu>>; primo at exlibrisusers.org<mailto:primo at exlibrisusers.org>
Betreff: Re: [Primo] [External] Primo norm rule to hide entire fields when specified language is present



I'm not sure if I feel more validated or disappointed; "subject" was the first thing I had tried.

I tried again just in case, but it still didn't work for some reason. Maybe another conflicting rule?



Although it is not ideal, I may end up just using that feature they're rolling out to hide selected terms.



thanks much!



sj



Saint-Jean Devereux
Library Technical Services

Shoreline Community College
library.shoreline.edu  |  206.546.6962
Pronouns: he, him / they, them

I will be working remotely until January 2022. The best way to reach me in the interim is via email.

I welcome VSRE emails. More at http://vsre.info<http://vsre.info/>





________________________________

From: Ehlert, Mark K. <ehle0001 at stthomas.edu<mailto:ehle0001 at stthomas.edu>>
Sent: Tuesday, November 30, 2021 3:30 PM
To: primo at exlibrisusers.org<mailto:primo at exlibrisusers.org> <primo at exlibrisusers.org<mailto:primo at exlibrisusers.org>>
Cc: Devereux, Saint-Jean <sdevereux at shoreline.edu<mailto:sdevereux at shoreline.edu>>
Subject: Re: [External] [Primo] Primo norm rule to hide entire fields when specified language is present



[ CAUTION: This email originated from outside Shoreline Community College. Do not click links or open attachments unless you recognize the sender and know the content is safe. ]




The problem lies in the "set" line with the term that points to the field being manipulated.



A. If you're writing this norm rule into a local Primo field (e.g., local_field_12), it'd look like this:



set pnx."display"."lds12" to "<span style=display:none;></span>"



B. If writing this rule into an named display field (e.g., subject), it'd look like this:



set pnx."display"."subject" to "<span style=display:none;></span>"



The "when" clause looks okay to me.



--
Mark K. Ehlert                                 Alma: NA04
Cataloging and Metadata Librarian          Primo VE: NA04
O'Shaughnessy-Frey Library, University of St. Thomas
<https://www.stthomas.edu/libraries/>

  "Experience is by industry achieved // And perfected by
the swift course of time"--Shakespeare, "Two Gentlemen of
Verona," Act I, Scene iii











On Nov 30, 2021, at 4:56 PM, Devereux, Saint-Jean via Primo <primo at exlibrisusers.org<mailto:primo at exlibrisusers.org>> wrote:



Hi All,



I've been trying to write a norm rule that will hide entire fields containing non-preferred terms.

I have tried numerous different ways of doing this. Here is the last one that didn't work. Any ideas what I am doing wrong here? Is what I am trying to do even possible?



rule "Primo VE - Non-preferred term"

when

MARC is "650"."a" AND

MARC."650"."a" match "Non-preferred term*"

then

set pnx."display". MARC "650" to "<span style=display:none;></span>"

end



I get this error when I try to save the rule:



The file cannot be saved due to a compilation error:

[7] Unable to expand: set operational."prima_display". MARC "650" to "<span style=display:none;></span>"



thanks!

regards,

sj



Saint-Jean Devereux
Library Technical Services

Shoreline Community College
library.shoreline.edu<http://library.shoreline.edu/>  |  206.546.6962
Pronouns: he, him / they, them

I will be working remotely until January 2022. The best way to reach me in the interim is via email.

I welcome VSRE emails. More at http://vsre.info<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvsre.info%2F&data=04%7C01%7Cehle0001%40stthomas.edu%7Cb921d90fe1c3449cfb1f08d9b454bcd0%7Ca081ff79318c45ec95f338ebc2801472%7C1%7C0%7C637739098314676516%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=7P3Ralng9t%2B9TWOnfJD9EM4GlmJFjVcbj9eT4W%2BVBR4%3D&reserved=0>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ctc.edu/pipermail/wactclc-alma_lists.ctc.edu/attachments/20211203/8e930314/attachment.html>


More information about the Wactclc-alma mailing list