<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal">I was trying to do something like this in the eprint/default.xml workflow, where we're replacing one field with another - but still want to display the field where someone already has set it:<o:p></o:p></p>
<p class="MsoNormal">&lt;stage name=&quot;files&quot;&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &lt;component type=&quot;Upload&quot; show_help=&quot;always&quot;/&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &lt;component type=&quot;Documents&quot;&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;epc:if test=&quot;OLD_DOCUMENT_FIELD&quot;&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;field ref=&quot;OLD_DOCUMENT_FIELD&quot;/&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/epc:if&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8230; (normal document fields) &#8230;<o:p></o:p></p>
<p class="MsoNormal">&nbsp;&nbsp;&nbsp; &lt;/component&gt;<o:p></o:p></p>
<p class="MsoNormal">&nbsp; &lt;/stage&gt;<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">This doesn't work, as the dataobject for the workflow is the EPrint, and the epc:test considers 'OLD_DOCUMENT_FIELD' as an eprint field (which doesn't exist).<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Is there a way to perform logic relating to document from within an eprint workflow?<o:p></o:p></p>
<p class="MsoNormal">I've tried various things (and trawled through the source code) but haven't found a solution yet.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">If there isn't currently a wat to achieve this, is it something that other people have wanted to do previously, or migth find useful?<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">For my specific needs, creating a new EPScript method e.g. EPrints::Script::Compiled::run_have_any_documents_got_field_set that would be called with the field in question:<o:p></o:p></p>
<p class="MsoNormal">&lt;epc:if test=&quot;have_any_documents_got_field_set('OLD_DOCUMENT_FIELD')&gt; &#8230; &lt;/epc:if&gt;<o:p></o:p></p>
<p class="MsoNormal">but if there was a wider requirement to be able to to this, then possibly allowing a call to e.g. test=&quot;$doc.field&quot; might be a more sustainable approach.<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">Cheers,<br>
John<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal">John Salter<o:p></o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Forcid.org%2F0000-0002-8611-8266&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C40510fb8faea45f9ec2208d7620f7f49%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=tB9NWDqbCmrXtM3LgW0OJBU7CpfGPBOzK5N7nMCpSS4%3D&amp;reserved=0" originalSrc="http://orcid.org/0000-0002-8611-8266" shash="IcFnF+mJZGcma02eC3+Uxo7kJo8XlqLLQMKSpQNFdG8Jp0Q4ow/WM1rpygC2IH9bP4e7C9M0fZ+6mAZR44muHViguIjWWKucLp+W30v8fR1YSvDgwQXgx6dDE9hArHS3iBFIRNkw/ngxAM59r2f5pyEA+q3Pdkx83+d49Y8vupI=" target="_BLANK"><span style="color:blue">http://orcid.org/0000-0002-8611-8266</span></a></span><span style="font-size:9.5pt;color:#888888;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;color:#888888;mso-fareast-language:EN-GB"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="color:#888888;mso-fareast-language:EN-GB">White Rose Libraries Technical Officer<br>
IT - Application Support (Research)<br>
10.23B, IT Services Building<br>
University of Leeds<br>
Leeds<br>
LS2 9JT<br>
0113 34 37385</span><span style="font-size:9.5pt;color:#888888;mso-fareast-language:EN-GB"><br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.5pt;color:#888888;mso-fareast-language:EN-GB">Online:
<a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwhiteroselibraries.wordpress.com%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C40510fb8faea45f9ec2208d7620f7f49%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=NBoz8zMVP58m2t57qNzu12tkDVz30VIVQM%2BCf6XnjU0%3D&amp;reserved=0" originalSrc="https://whiteroselibraries.wordpress.com/" shash="nEpijg5Ee3onId2nqvQVKhnDNeBH5d3r99kXCITDCreky/iArlG2rrmjExKKRlzpUlK4c1cjPHnBcO0yARqe+pNZjigSEMc7svMq4DWghC6TLrzbpOgPOUMNI5wGqj4/ZyrdQraUHuqnPkU07l3/OnT0vDI6lxhrfBfaJKbm6zc="><span style="color:#0563C1">https://whiteroselibraries.wordpress.com/</span></a><br>
</span><span style="mso-fareast-language:EN-GB"><img border="0" width="424" height="158" id="Picture_x0020_1" src="cid:image003.jpg@01D593F8.58F918F0" alt="WRL_email_signature_thelmas_"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>