Re: [IUG] PRINT TEMPLATE
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thanks, Steve. I have forgotten the reason that I didn't use callNumericAll, but that's the answer. And even the decimal point is there.
Liz
-----Original Message-----
From: innopac-bounces at innovativeusers dot org [mailto:innopac-bounces at innovativeusers dot org] On Behalf Of McDonald, Stephen
Sent: Tuesday, November 30, 2010 1:11 PM
To: 'IUG INNOPAC List'
Subject: Re: [IUG] PRINT TEMPLATE
Alternatively, you could use callNumericAll instead of callNumericStart+callNumericAfterDec. Unless your records for some reason occasionally have blanks before the decimal that you want to get rid of. For this solution, replace the following lines:
$F{callNumericStart}.trim() +
$F{callNumericAfterDec}.trim() +
($F{callNumericAfterDec}.equals("") ? "" : "\n") +
With:
$F{callNumericAll}.trim() +
($F{callNumericAll}.equals("") ? "" : "\n")
I think this is the solution that I actually posted to the wiki--I'll have to check.
Steve McDonald
Steve dot mcdonald at tufts dot edu
> -----Original Message-----
> From: innopac-bounces at innovativeusers dot org [mailto:innopac-
> bounces at innovativeusers dot org] On Behalf Of Liz Fairman - LAWLIBX
> Sent: Tuesday, November 30, 2010 2:23 PM
> To: 'IUG INNOPAC List'
> Subject: [IUG] PRINT TEMPLATE
>
> Thanks to the good people who posted templates to the wiki, I put
> together a nice workable script, except (there had to be an "except")
> when there's a call number with a letter, not a number, after the
> decimal.
>
> This call number should print on four rows
> KFA2682
> .R4
> L56
> 2006
>
> but is printing on three
> KFA2682 R4
> L56
> 2006
>
> I need to know what to enter to get a line break when there is no
> callNumericAfterDec. Suggestions?
>
> $F{callAlphaStart}.trim() +
> ($F{callAlphaStart}.equals("") ? "" : "\n") +
> $F{callNumericStart}.trim() +
> $F{callNumericAfterDec}.trim() +
> ($F{callNumericAfterDec}.equals("") ? "" : "\n") +
> ($F{callSuba}.matches("(?s)[A-Z].*") ? "." : "") +
> ($F{callSuba}.matches("[0-9a-zA-Z]*\\.[A-Z].*") ?
> ($F{callSuba}.substring(0,$F{callSuba}.indexOf(".")) + "\n" +
> $F{callSuba}.substring($F{callSuba}.indexOf("."),$F{callSuba}.length())
> ) : $F{callSuba}).trim().replaceAll("\\s","\n") +
> ($F{callSuba}.equals("") ? "" : "\n") +
> ($F{callSubb}.matches("(?s)[A-Z].*") ? ($F{callSuba}.matches("(?s)[A-
> Z].*") ? ($F{callSuba}.matches(".* .*") ? "." : "") :
> ($F{callSuba}.matches(".*\\..*") ? "" : ".")) : "") +
> $F{callSubb}.trim().replaceAll("\\s","\n").replaceAll("\\.\\s",".").rep
> laceAll(",\\s","\n").replaceAll("\\smaj\\.","
> maj.\n").replaceAll("\\smin\\."," min.\n") +
> ($F{callSubb}.equals("") ? "" : "\n") +
> $F{itemv} + "\n" + $F{itemo}
>
> Liz Fairman
> Technical Services Librarian
> Superior Court Law Library
> Phoenix AZ
> 602-506-3462
> lfairman at scll dot maricopa dot gov
> http://www.superiorcourt.maricopa.gov/LawLibrary/
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
> --
> This message was distributed through the Innovative Users Group INNOPAC
> list
> Public replies: INNOPAC at innovativeusers dot org
> Update your subscription options: http://innovativeusers.org/iug-
> discussion-list
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
--
This message was distributed through the Innovative Users Group INNOPAC list
Public replies: INNOPAC at innovativeusers dot org
Update your subscription options: http://innovativeusers.org/iug-discussion-list
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.