<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:'Segoe UI WPC', 'Segoe UI', Tahoma, 'Microsoft Sans Serif', Verdana, sans-serif;font-size:11pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(223, 237, 250);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(223, 237, 250) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><br>
</p>
<p>Hi Ben,<br>
</p>
<p><br>
</p>
<p>Yes, the refid rules have been implemented as a plugin. The documentation is here : <br>
</p>
<p><br>
</p>
<p><a href="https://github.com/archivesspace/archivesspace/tree/master/plugins/refid_rules">https://github.com/archivesspace/archivesspace/tree/master/plugins/refid_rules</a><br>
</p>
<p><br>
</p>
<p>So, to enable this, edit the config/config.rb file to load the plugin (about line 102) : <br>
</p>
<p><br>
</p>
<p>AppConfig[:plugins] = ['refid_rules', 'local']<br>
</p>
<p><br>
</p>
<p>Then, define the rule that you want to use in the config/config.rb. <br>
</p>
<p><br>
</p>
<p>For example: <br>
</p>
<p>AppConfig[:refid_rule] = "<%= repository['repo_code'] %>_<%= resource['formatted_id']  %>_<%= SecureRandom.hex %>"<br>
</p>
<p><br>
</p>
<p>This is using a templating languaged call ERB, so you can call variables with-in a  <%= %>  block. You can do something like:<br>
</p>
<p><br>
</p>
<p>AppConfig[:refid_rule] = "Bananas_<%= SecureRandom.hex %>"<br>
</p>
<p><br>
</p>
<p>Which would generate a RefID like "Bananas_" + a randomly generated hexadecimal.  <br>
</p>
<p><br>
</p>
<p>Does this make sense?<br>
</p>
<p>Let me know if you have any questions...<br>
</p>
<p><br>
</p>
<p>best, chris. <br>
</p>
<p><br>
</p>
<p><br>
</p>
<div>
<p><br>
</p>
<div class="BodyFragment"><font size="2">
<div class="PlainText">Chris Fitzpatrick | chris.fitzpatrick@lyrasis.org<br>
Developer, ArchivesSpace<br>
http://archivesspace.org/<br>
</div>
</font></div>
</div>
<div style="color: #282828;">
<hr tabindex="-1" style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size: 11pt;"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Ben Goldman
 <bmg17@psu.edu><br>
<b>Sent:</b> Thursday, March 13, 2014 5:04 PM<br>
<b>To:</b> archivesspace users group<br>
<b>Subject:</b> [Archivesspace_Users_Group] construct unique ref IDs</font>
<div> </div>
</div>
<div>
<div style="font-family: georgia, serif; font-size: 10pt; color: #000000;">
<div>Hello,</div>
<div><br>
</div>
<div>I see this made it into the newest release, <a href="https://www.pivotaltracker.com/s/projects/386247/stories/49569471,">https://www.pivotaltracker.com/s/projects/386247/stories/49569471,</a> but after a cursory search of the staff interface, I am unclear
 how to actually go about using this feature. Any direction you can provide is appreciated.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Ben</div>
<div><br>
</div>
<div><span style="color: #000000; font-size: small;"><span style="font-family: georgia, serif; font-weight: bold;">Ben Goldman</span><br style="font-family: georgia, serif;">
<span style="font-family: georgia, serif;">Digital Records Archivist</span><br style="font-family: georgia, serif;">
<span style="font-family: georgia, serif;">Penn State University Libraries</span><br style="font-family: georgia, serif;">
<span style="font-family: georgia, serif;">University Park, PA</span><br style="font-family: georgia, serif;">
<span style="font-family: georgia, serif;">814-863-8333<br>
<a href="http://www.libraries.psu.edu/psul/speccolls.html" target="_blank">http://www.libraries.psu.edu/psul/speccolls.html</a><br>
</span></span><br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>