Hi Owen and All, Thank you for your quick reply and very good advice. I will follow your idea on good documentation in the report. I have no knowledge on runtime parameters but thanks for that pointer too. If you can increase my knowledge on how to tell an authorized value or where to look I'd be grateful. I have used the 'itemtypes' authorized value (as copied from the koha reports library) but I'm always curious to learn more about it or at least understand it better. (-- WHERE items.itype= <<Itemtype|itemtypes>>) Thanks a lot Regards James On Thu, Aug 12, 2021 at 3:24 PM Owen Leonard <oleonard@myacpl.org> wrote:
WHERE categories.category_type= <<CATEGORY|category_type>>
category_type is an odd one. It's not an authorized value. In fact I don't think they're defined anywhere in the database at all, just hard-coded into templates and scripts. They're intended to be fixed values, not ones which can be modified.
I don't think there's any way to get an SQL report to generate a set of options based on these values. It would be nice if one could supply a set of user-defined options in a runtime parameter, e.g. <<Category type|[{A:"Adult",C:"Child"}]>> but that would be complicated for users. I think in your case you might have to rely on good documentation in the report notes to let the user know which category_type codes are valid.
-- Owen
-- Web Developer Athens County Public Libraries (740) 737-6006 https://www.myacpl.org