Working with Library Independence
The Library Independence feature allows you to restrict the data that appears in Analytics reports to include only data from a specific library. This prevents users from viewing data that they are not authorized to view. To implement this feature, you must assign the Library Level Analytics Consumer role to the user and apply a filter to the reports whose data you want to restrict.
For information on assigning roles to users, see Managing User Roles.
Adding the Library Code Active Filter to Reports in Classic Analytics
- Assign the Library Level Analytics Consumer role to the user.
- From the Scope drop-down list, select the library to which you want to limit the user.
Library Level Analytics Consumer Role
- Open the subject area for which you want to create a report. The Library Code Active Filter is available for the following fields:
- Borrowing Requests (Resource Sharing) > Library Unit > Library Code (Active)
- DARA > Library Unit > Library Code (Active)
- Digital Inventory > Representation Library Unit > Library Code (Active)
- Digital Waitlist > Library Unit > Library Code (Active)
- E-Inventory > Portfolio Library Unit > Library Code (Active)
- Fines and Fees > Owning Library > Owning Library Code (Active)
- Fulfillment > Item Location at time of loan > Library Code (Active)
- Funds Expenditure > Library Unit > Library Code (Active)
- Lending Requests (Resource Sharing) > Library Unit > Library Code (Active)
- Licenses > License Library Unit > Library Code (Active)
- Physical Items > Library Unit > Library Code (Active)
- Purchase Requests > Library Unit > Library Code (Active)
- Requests > Owning Library > Owning Library Code (Active)
For information on creating reports with the filter for Data Visualization reports, see Adding the Library Code Active Filter to Reports with Data Visualization. - From the Catalog pane on the bottom left of the Analysis development window, select Shared Folders > Alma > Subject Area Contents > [subject area] > Library Code Active Filter
: Library Code Active FilterThe Apply Saved Filter dialog appears:
Apply Saved Filter - Select OK.
- Create the report. The filter is applied and data appears only from the library specified in the role.
Adding the Library Code Active Filter to Report Prompts
When the Library Code Active Filter is added to a report, it filters the report's results by the library restriction, but it does not affect the prompts in the report. You must add the filter to the report prompts separately:
- From the Apply Saved Filter page, copy the contents of the filter. Make sure to copy all the characters.
- From the Prompts tab, select the icon to add a new prompt. The New Prompt dialog box opens.
- Expand the Options section to display the Choice List Values section.
New Prompt
- From the Choice List Values drop-down list, select SQL Results.
- In the SQL Statement text box, before the text FETCH FIRST 65001 ROWS ONLY, add the word WHERE and then paste the filter text that you copied. An example of the end result is the following:
SELECT "Library Unit"."Library Name (Active)" FROM "Borrowing Requests (Resource Sharing)" WHERE "Library Unit"."Library Code (Active)"= VALUEOF(NQ_SESSION."REST_LIBRARY_CODE") OR VALUEOF(NQ_SESSION.REST_LIBRARY_CODE) = 'ALL' FETCH FIRST 65001 ROWS ONLY
- Select OK.
The values in the prompt are now filtered by the library restriction filter. You can apply the filter in the SQL statement to any column’s prompts.
Adding the Library Code Active Filter to Reports with Data Visualization
Configuring Library Independence for Data Visualization reports requires a separate workflow than in Classic Analytics, since Data Visualization does not provide the option of saving a filter. To configure Library Independence for Data Visualization, copy the DV report template from the Classic Analytics interface and save it to your local folder. Create your Data Visualization report with this file.
For example:
Out-of-the-Box Dashboards and Prompts
Out-of-the-box prompts and DV dashboard templates are available with the Library Code Active filter already configured. You can use these prompts and templates to create dashboards that are filtered to the scope of the user. If the user has the Library Level Analytics Consumer role scoped to specific libraries, the prompt displays the library names within the user's scope. The user selects a library to filter the reports of the dashboard. Similarly, you can use the templates to create dashboards that are filtered to the scope of the user. The dashboards are located in the same location as the Library Code Active filters (Shared Folders > Alma > Subject Area Contents > [subject area]).
Library Level Reports for Statistical Categories and Library Fields
You can see reports filtered to the library defined by the Library Level Analytics Consumer role by creating reports with the following library level fields:
- Statistics > Statistics Library Code and Statistics Library Name
- Note > Library Code and Library Description
- Block > Library Code and Library Description
Because these fields do not have the Library Code Active Filter available, you must apply a filter manually to limit the results to a specific library.
- Select Filter for the field you want to filter. The New Filter dialog appears:
New Filter
- Select Convert this filter to SQL, and select OK. The Advanced SQL Filter dialog appears:
Advanced SQL Filter
- Add the following text after the existing text, and select OK.
VALUEOF(NQ_SESSION."REST_LIBRARY_CODE") OR VALUEOF(NQ_SESSION.REST_LIBRARY_CODE) = 'ALL'
The fields are filtered according to the library that is defined by the Library Level Analytics Consumer role.