Add custom fields using patron attribute type

Patron attributes are used to define custom fields (e.g. Course name, Class name, Category name, Blood group, etc.) to associate with your patron records. In order to enable the use of custom fields you need to set the ExtendedPatronAttributes from the koha system preferences.


Enable Patron Attributes 

Koha Administration ➤Global System preferences ➤ Patrons  ➤  ExtendedPatronAttributes  Enable

Create an Authorized Value for the course 

Koha Administration  Authorized values  New category

Enter the Authorized value in the new category and Save it.

Add Courses name to the Authorized values.

Add the name of courses one by one and save

You can add as many courses as you want

Add a new patron attribute type for the Course.

Koha Administration ➤ Patron attribute types ➤ New Patron attribute type

Enter details of Patron Attribute Type for Course and save

You will see the drop-down list of  additional field of course names while adding the patrons

Create a Report on Patron Attributes

SELECT a.borrowernumber,  p.cardnumber, p.firstname, p.surname, a.code, a.attribute AS CourseName
FROM borrower_attributes a
LEFT JOIN borrowers p USING (borrowernumber)
WHERE a.code = 'Course'

(In the above particular report, we used the patron attribute code "Course" under the "where" statement. You can customize the report as per your patron attribute code.)


Information Courtesy: http://kohageek.blogspot.com/2022/11/patron-attribute-types.html

Post a Comment

0 Comments