[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] Re: Retrieving arrays for export

On 19/05/14 14:37, Andrew Beeken wrote:
> Hello!
> Okay, so I?m writing a new export template at the moment. Basic CSV
> output, but I want to extract some data that seems to be stored in
> arrays ? namely, ISBN. So, when I extract the ISBN in my export
> template I get the following: ARRAY(some_hex), where some_hex
> actually changes every time the output is regenerated. I?ve tried
> outputting the value with a join command to pipe delimit the data but
> it doesn?t do anything to the output ? any ides?

## Not sure the $eprint->get call.... but you know that bit already
if ('ARRAY' eq ref $eprint->get($field) ) {
   $value = join ', ', @{ $eprint->get($field) }; # get the list
   $value = q{"} . $value . {"}                   # quote 'cos of commas
} else {
   $value = $eprint->get($field)                  # string is unchanged

.... or something similar


Ian Stuart.
Developer: ORI, RJ-Broker, and OpenDepot.org
Bibliographics and Multimedia Service Delivery team,
The University of Edinburgh.


This email was sent via the University of Edinburgh.

The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.