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

[EP-tech] Getting Data from the EPrints Database - not urgent



Hello everyone,

I altered the staff/admin view of our EPrints installation at the start of
February this year so that it displays both a link to the EPrints record
and a link to the corresponding Elements record:

[image: image.png]

I managed to successfully grab the Elements ID from the Crosswalks and add
it as a new field in the EPrints database ("eprint" table) under a field
name of "elemid". The link only shows if an item has an elements ID and so
far I've not had any problems with it.

I'm just not sure the way I'm grabbing the elements ID from the eprints
database is correct. When I get the eprint ID I do the following in my
local copy of View.pm:

my $eprint = $self->{processor}->{eprint};
$eprint->id;

I know there's other STUFF elsewhere in this module that handles getting
the eprint  and ID. No matter what I do I can't get the Elements ID in this
way and I have to use a small function to perform a SQL query to get
"elemid". Is there a way I could more easily/cleanly get the elemid without
writing a SQL query? I'm assuming there is and I'm totally misunderstanding
what's happening.

Thanks,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20190829/c1601504/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 90442 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20190829/c1601504/attachment-0001.png