Tech Blog

PrimoVE Item Locations Filter

We recently switched from Primo to PrimoVE and have had numerous complaints about activating the Filter Options for item locations in the Full Display view.

Here is the code I wrote to auto-enable the filter so that it will be on for users when they do a search. Here is a sample picture showing the filter on:

Here is the code:

/* Load JQuery */
/* JQuery required for this process */

var js = document.createElement('script') ;
js.src = "//";

  "use strict";
  "use strict";

  var app = angular.module('viewCustom', ['angularLoad']);

  //Auto activates the filter for items in full display
  //written on 2/4/20 by Joe Ferguson from the University of Tennessee, Knoxville
  app.component('prmLocationItemsAfter', {
    bindings: {parentCtrl: '<'},
    controller: function($scope){
      var myVar = setInterval(activateFilter, 1000);

      function activateFilter() {
        if( $("span:contains('Filters')").length ){

        if( $("[id^='filter']").length ){

8 Replies to “PrimoVE Item Locations Filter”

  1. I updated the code sample to show what the entire custom.js file would look like if you just had this customization. It requires the addition of jquery which I did not include in the previous code.

  2. Hi Joe, although it did work as I mentioned, it interferes with other scripts in the .js file. I’ve placed it near the top of the file and also at the bottom, however it still affects the other scripts. Any advice?

    Thanks in advance.

Leave a Reply