Availability Facet Counts


Hui Zhang, Oregon State University


The availability facets don’t show counts like other facet groups in Primo VE because they’re slightly inaccurate due to dedup/FRBR. However, libraries can use this customization to show approximate result counts to patrons before they click.

Availability facet with counts displayed next to the list items, with a message at the end: Counts are approximate. Results may differ.

System Components

Alma Discovery Customization Package Manager 

Skillset Requirements

Alma Discovery Package Manager, JavaScript


Not tested for accessibility

Browser Support

Tested on Chrome, Edge, Firefox, and Safari

Mobile Support

Tested on iPhone



To enable this module, you will need to:

  • Declare the module (Step 2)
  • Insert a declaration to hold the code from the Central Package (Step 3)


  1. Turn on inheritance from the Central Package.
  2. In your local package, in the custom.js file, include the module 'availabilityCounts' in your app definition. For example:

    var app = angular.module('viewCustom', ['hathiTrustAvailability', 'availabilityCounts']);
  1. Also in the custom.js file, add the following line of code within the anonymous function (that is, before the closing brackets at the end of the file)…
    1. If there is another module like 'external-search-contents' already under 'prmFacetExactAfter' (replace 'external-search-contents' with the name of your module): 

      app.component('prmFacetExactAfter', {
      template: '<external-search-contents></external-search-contents><availability-counts></availability-counts>'

    2. Otherwise:

      app.component('prmFacetExactAfter', {
      template: '<availability-counts></availability-counts>'
  1. Optional: Include the following block of code to customize the message on availability count accuracy:

    app.value('availabilityCountsOptions', {