If you add custom fields to your signup forms, e.g., "First Name" or "Library Card #," you may want to use those fields to search for patrons in your Patron Search form.
Visit the Patron Search page (SITE/staff/patron-search) and hover over the little gear icon in the upper right corner of the page, then click Edit View.
On the subsequent "edit Patron Search (User)" page, note the sections we've highlighted in red, compared to corresponding sections on the Patron Search page. Fields are the columns of data that appear in the table -- this is the data you want to see for each user. Filters are the dropdown search options at the top of the page. You can add (or remove) fields from your results, and separately add/remove filters for their search capabilities.
above: the Edit screen to modify the Patron Search report
below: the Patron Search report with the corresponding sections highlighted
Section 1: Add a new FIELD to the results.
1) In the Field section (marked "1" in the screenshot above), click the highlighted "Add" button to add a new field.
2) In the resulting pop-up screen, use the Search field to find the field that you wish to add. For example, if we added a "First Name" field to our sign-up forms, with machine name "field_first_name," we can search for it and check it (and click the "Apply" button) to add it to the Patron Search form. See the screenshot below.
3) On the next screen, shown below, just accept all the defaults and click the "Apply" button again.
4) Scroll to the bottom of the page where there is a "preview" version of the Patron Search form and its results. There should now be a column at the end of the results table for "First Name" as shown in the screenshot below:
5) We'll now add a "filter" to the top of the Patron Search form so that staff can search for patrons based on that field. In the "Filter Criteria" section, click the "Add" button to add a new filter. (Refer to image #2 on this page, it's the button in the red box marked with the number "2.")
6) Adding a filter is very similar to adding a field. We need to find the filter to add -- in this case, we search for "First" to find our "First Name" (machine name: field_first_name) field and check the box to establish it as a filter. Note that there are advanced filters -- so be careful to select the filter field that exactly matches the machine name of your signup form field. See below: we're trying to add "field_first_name" which is our First Name field -- but there is also an available advanced variant that we do not want called "field_first_name:format" -- make sure you check the one that matches exactly.
7) When you add a filter, you need to "expose" it so your staff can use it to search. Click the "expose this filter" checkbox as shown below:
8. Once you check the "expose this filter" box, the pop-up expands and shows more options. There are only three things we want to change on the expanded form, illustrated in the following screenshots:
a) clean up the "Label" section. By default, the label includes the field's machine name, but that might confuse staff -- so delete that part of the label. In our example, we'll leave the "First Name" section intact.
b) select the "Contains" operator. This is the most useful operator for staff to search text fields. For instance, searching for "First Name" CONTAINS "Mar" would return "Margaret," "Maria," "Maribel," "Mary," etc. Other useful operators include "Is equal to" which would be useful if searching for the last name "Smith-Jones" (it would only return the exact result "Smith-Jones" as opposed to all of the Smiths that would come up with the "contains" operator.
c) check the "expose operator" checkbox.
9. Click "Apply" to save the new filter.
10. Confirm that it appears in the Patron Search preview at the bottom of the page.
11. Rearrange the filters and fields to put them in logical order. Your new Fields and Filters are added to the end of their respective sections, but you can use the "Rearrange" button to re-order them. The Field section and Filter Criteria section "Add" buttons have a little arrow next to them -- click the arrow and you'll see a Rearrange option. Click that and you'll be given a form to re-order your Filters (or Fields) -- just drag by the arrow handle and save. You can also use the "Remove" option on the Rearrange form to delete a Field or Filter you no longer wish to use.
12. The most important step -- use the Save button at the top of the view, immediately below the big yellow "You must save!" warning box, to save your View. Check the resulting Patron Search form and test it to make sure your changes worked.