Re: [IUG] Print templates: monographs


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Try this use of the substring Java function:

<textFieldExpression
class="java.lang.String"><![CDATA[(!$F{branchesLabel}.equals("")) ?
(($F{branchesLabel}.length() > 10) ?
$F{branchesLabel}.replaceAll("\\s","").substring(0,10) :
$F{branchesLabel}.replaceAll("\\s",""))
: ""]]></textFieldExpression>
</textField>

This is also editing out the spaces (replaceAll) - you might not want to
do that.

Cindy Harper, Systems Librarian
Colgate University Libraries
charper at colgate dot edu
315-228-7363



On Mon, Jan 16, 2012 at 4:12 AM, Suzanne Saunders <
Suzanne dot Saunders at wits dot ac dot za> wrote:

> Hi everyone,
>
>
>
> Is there an option in the setup of a print template to limit the number
> of characters printed from a particular field?
>
>
>
> We do need the branchesLabel option on spine labels BUT not the entire
> name...
>
>
>
> The branches label is too complete and extensive e.g.
>
>
>
> I need a label to print for location "aph"
>
> MAIN
>
> Short
>
>
>
> NOT the full description as below...
>
>
>
> Main Library. Short loan. Photocopy.
>
> For itemFix79Len3 wont help either as some of our branches have many
> sublocations and collections and simply repeating the first 3 characters
> wont help in directing the user (or finding the material).
>
> Using the same example as above itemFix79 wont work either because no
> user would ever know where the aph library is.
>
> Is there another field that we can set-up to create the item locations
> and enter shelf locations as we would like them printed on the spine
> label?
>
> Has anyone else had this problem?
>
>
>
> Wishing everyone a happy 2012.
>
>
>
> Kind regards,
> Suzanne
>
> Suzanne Saunders
> Library Systems Administrator
> Library Computer Services
> Tel: 011 717 1918
> Follow us on Facebook
> <http://www.facebook.com/pages/University-of-the-Witwatersrand-Library/2
> 40440919301672>
>
> How is our service ?
>
> If you wish to comment on our service or offer suggestions on service
> issues, please email service dot admin at wits dot ac dot za
> <BLOCKED::mailto:service dot admin at wits dot ac dot za> . Confidentiality will be
> respected, but anonymous complaints will not be followed up.
>
>
>
>
>
>
>
>
> <html><p><font face = "verdana" size = "0.8" color = "navy">This
> communication is intended for the addressee only. It is confidential. If
> you have received this communication in error, please notify us immediately
> and destroy the original message. You may not copy or disseminate this
> communication without the permission of the University. Only authorized
> signatories are competent to enter into agreements on behalf of the
> University and recipients are thus advised that the content of this message
> may not be legally binding on the University and may contain the personal
> views and opinions of the author, which are not necessarily the views and
> opinions of The University of the Witwatersrand, Johannesburg. All
> agreements between the University and outsiders are subject to South
> African Law unless the University agrees in writing to the
> contrary.</font></p></html>
>
> --
> 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
> You are currently subscribed to innopac as: charper at colgate dot edu dot
> 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.



--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---