<div dir="ltr">Hi Alan,<div><br></div><div>Thank you; that was it! I have no idea why I struggled so much with it when I was first doing it because that seems quite straight forward and I've used"<span style="text-indent:48px">get_value"</span> to get at other fields elsewhere since then.</div><div><br></div><div>My only defence is that it was almost seven months ago and I hadn't been in the job for long. I'm currently going through past things that I've done that appear to work and checking them for stupidity and making sure they've been done the "correct" way.</div><div><br></div><div>Thanks for your help!</div><div><br></div><div>James</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 29, 2019 at 12:04 PM Alan.Stiles <<a href="mailto:alan.stiles@open.ac.uk">alan.stiles@open.ac.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-GB">
<div class="gmail-m_6772211047772387227WordSection1">
<p class="MsoNormal"><span>Hi James,<u></u><u></u></span></p>
<p class="MsoNormal"><span>Once you have the eprint object, I’d have expected something like<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal" style="text-indent:36pt"><span>my $elements_id = $eprint->get_value(“elemid”);<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Though I’m just back from holiday and that’s come from my partially functional brain.<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span>Alan<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> <a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a> <<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a>>
<b>On Behalf Of </b>James Kerwin via Eprints-tech<br>
<b>Sent:</b> 29 August 2019 11:39<br>
<b>To:</b> <a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a><br>
<b>Subject:</b> [EP-tech] Getting Data from the EPrints Database - not urgent<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hello everyone,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">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:<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><img width="542" height="300" style="width: 5.6458in; height: 3.125in;" id="gmail-m_6772211047772387227_x0000_i1025" src="cid:16cdd91655b4cff311" alt="image.png"><u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">my $eprint = $self->{processor}->{eprint};<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">$eprint->id;<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">James<u></u><u></u></p>
</div>
</div>
</div>
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority in relation to its
secondary activity of credit broking.
</div>
</blockquote></div>