[Archivesspace_Users_Group] Custom reports with string params?

Mayo, Dave dave_mayo at harvard.edu
Fri Oct 2 12:07:11 EDT 2020


Hi,

We have a plugin we wrote with some custom SQL reports – this one uses a string parameter for an EADID or list of EADIDs - https://github.com/harvard-library/harvard_aspace_reports/blob/master/backend/model/resource_top_containers.rb

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.

--
Dave Mayo (he/him)
Senior Digital Library Software Engineer
Harvard University > HUIT > LTS

From: <archivesspace_users_group-bounces at lyralists.lyrasis.org> on behalf of Karen Miller <k-miller3 at northwestern.edu>
Reply-To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Date: Friday, October 2, 2020 at 9:42 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: Re: [Archivesspace_Users_Group] Custom reports with string params?

Hi Nick,

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.

Karen

From: archivesspace_users_group-bounces at lyralists.lyrasis.org <archivesspace_users_group-bounces at lyralists.lyrasis.org> On Behalf Of Nick Butler
Sent: Friday, October 02, 2020 6:14 AM
To: Archivesspace Users Group <archivesspace_users_group at lyralists.lyrasis.org>
Subject: [Archivesspace_Users_Group] Custom reports with string params?

Hi all,

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. https://github.com/archivesspace/archivesspace/blob/75000415aa5ee60411c6caf012042af4fc157d00/frontend/app/views/jobs/_form.html.erb#L121<https://urldefense.com/v3/__https:/github.com/archivesspace/archivesspace/blob/75000415aa5ee60411c6caf012042af4fc157d00/frontend/app/views/jobs/_form.html.erb*L121__;Iw!!Dq0X2DkFhyF93HkjWTBQKhk!GX75QheNm0-XxIApINdOyeac54bS2ZjNyPlm_nxqTYFfTBABH9vDI0OxgolnoLIKYgcArjCl$> 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?

Many thanks!
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lyralists.lyrasis.org/pipermail/archivesspace_users_group/attachments/20201002/e3fe07fa/attachment.html>


More information about the Archivesspace_Users_Group mailing list