<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=utf-8">
<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:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
{mso-style-name:x_msonormal;
margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
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-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hmmm. I will double check, but this is running in production over here right now, so I’m wondering if the reporting functionality has changed since I looked at it. What version of ASpace are you targeting?
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">--<o:p></o:p></p>
<p class="MsoNormal">Dave Mayo (he/him)<o:p></o:p></p>
</div>
<p class="MsoNormal">Senior Digital Library Software Engineer<br>
Harvard University > HUIT > LTS<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black"><archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Nick Butler <npwb2@cam.ac.uk><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Monday, October 5, 2020 at 5:02 AM<br>
<b>To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>Re: [Archivesspace_Users_Group] Custom reports with string params?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div id="appendonsend">
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Hi Dave,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Thank you for this link, it's really helpful. I've installed your reports plugin on a dev system and am now hitting the same problem I'm having with my report - how to get the text box to show
up on the report screen (i.e. what to put in the jobs/report_partials/_string partial). I tried just using the following line:<br>
<br>
</span><span style="font-size:12.0pt;font-family:"Courier New";color:black"><% form.textfield name, nil, :class => 'text-field form-control' %></span><span style="font-size:12.0pt;color:black"><br>
<br>
But this leads to the attached being displayed instead of a text box! Might you be able to advise on how you were able to configure String parameter entry? It's not part of this plugin as far as I can see.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Many thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black">Nick<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Mayo, Dave <dave_mayo@harvard.edu><br>
<b>Sent:</b> 02 October 2020 17:07<br>
<b>To:</b> Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject:</b> Re: [Archivesspace_Users_Group] Custom reports with string params?</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal">Hi,<br>
<br>
We have a plugin we wrote with some custom SQL reports – this one uses a string parameter for an EADID or list of EADIDs -
<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_harvard-2Dlibrary_harvard-5Faspace-5Freports_blob_master_backend_model_resource-5Ftop-5Fcontainers.rb&d=DwMF-g&c=WO-RGvefibhHBZq3fL85hQ&r=_Mv1dY22K7jvT5MD7xjbvGVzRDOUMhx4WYcnPSIzYnE&m=vxglUw8t_VtzdmI4EgmrlZKgEhbH4HWb62nSSw8qxSg&s=_4X19v5v8vsd2PaH5kstXhBz--LcfhRVWxmxhDgeTxk&e=">
https://github.com/harvard-library/harvard_aspace_reports/blob/master/backend/model/resource_top_containers.rb</a><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="xmsonormal"><br>
This is currently installed in production and working; it should be fine to install it and test locally or on a QA system, if you want to try it out in a live system.<span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="xmsonormal"> <span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<div>
<p class="xmsonormal">--<span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="xmsonormal">Dave Mayo (he/him)<span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<p class="xmsonormal">Senior Digital Library Software Engineer<br>
Harvard University > HUIT > LTS<span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="xmsonormal"> <span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="xmsonormal"><b><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black">From:
</span></b><span style="font-size:12.0pt;font-family:"Times New Roman",serif;color:black"><archivesspace_users_group-bounces@lyralists.lyrasis.org> on behalf of Karen Miller <k-miller3@northwestern.edu><br>
<b>Reply-To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Date: </b>Friday, October 2, 2020 at 9:42 AM<br>
<b>To: </b>Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject: </b>Re: [Archivesspace_Users_Group] Custom reports with string params?</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<div>
<p class="xmsonormal"><span style="font-family:"Times New Roman",serif"> </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<p class="xmsonormal"><span style="font-family:"Arial",sans-serif;color:#1F497D">Hi Nick,</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="xmsonormal"><span style="font-family:"Arial",sans-serif;color:#1F497D"> </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="xmsonormal"><span style="font-family:"Arial",sans-serif;color:#1F497D">I have an SQL query that I’ve embedded into an Excel spreadsheet (as a .odc file) which prompts the user for a value. The value I’m prompting for is numeric, but the code could
be adjusted to take a string. I don’t think this is what you want, but if it is, please let me know and I’ll forward the code.</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<p class="xmsonormal"><span style="font-family:"Arial",sans-serif;color:#1F497D"> </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<div>
<p class="xmsonormal"><span style="font-family:"Arial",sans-serif;color:#1F497D">Karen</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<p class="xmsonormal"><span style="font-family:"Arial",sans-serif;color:#1F497D"> </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="xmsonormal"><b>From:</b> archivesspace_users_group-bounces@lyralists.lyrasis.org <archivesspace_users_group-bounces@lyralists.lyrasis.org>
<b>On Behalf Of </b>Nick Butler<br>
<b>Sent:</b> Friday, October 02, 2020 6:14 AM<br>
<b>To:</b> Archivesspace Users Group <archivesspace_users_group@lyralists.lyrasis.org><br>
<b>Subject:</b> [Archivesspace_Users_Group] Custom reports with string params?<span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
</div>
<p class="xmsonormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"> <o:p></o:p></span></p>
<div>
<p class="xmsonormal"><span style="font-size:12.0pt;color:black">Hi all,</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<div>
<p class="xmsonormal"><span style="font-size:12.0pt;color:black"> </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<div>
<p class="xmsonormal"><span style="font-size:12.0pt;color:black">We've been asked to create a custom report that allows the user running it to input a string which is then used to search across various fields. I've checked through the pre-existing reports,
and through several reports created by other institutions, but I haven't found an example of a report accepting a string parameter (only booleans and dates). I see from e.g. <a href="https://urldefense.com/v3/__https:/github.com/archivesspace/archivesspace/blob/75000415aa5ee60411c6caf012042af4fc157d00/frontend/app/views/jobs/_form.html.erb*L121__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!GX75QheNm0-XxIApINdOyeac54bS2ZjNyPlm_nxqTYFfTBABH9vDI0OxgolnoLIKYgcArjCl$">https://github.com/archivesspace/archivesspace/blob/75000415aa5ee60411c6caf012042af4fc157d00/frontend/app/views/jobs/_form.html.erb#L121</a>
that it should be possible to use a custom partial for different data types but nothing I've tried has worked so far. Is anyone doing anything like this, and might they have an example of it working?</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<div>
<p class="xmsonormal"><span style="font-size:12.0pt;color:black"> </span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<div>
<p class="xmsonormal"><span style="font-size:12.0pt;color:black">Many thanks!</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
<div>
<p class="xmsonormal"><span style="font-size:12.0pt;color:black">Nick</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>